I would like to use 24 Hour format (00-23 Hrs).
What is the simplest method to format a tm_hours (12Hr) value to %H hours?
I can not find an example. My code snippet is below.
time_t now;
struct tm * timeinfo;
time(&now);
timeinfo = localtime(&now);
Serial.println(timeinfo->tm_hour);
if ((timeinfo->tm_hour)>= 22) // 10PM Event
//Do something here
Reference:
https://www.jtbullitt.com/tech/cheats/ctime-cheat-sheet.pdf
Any suggested syntax appreciated.