DateTime Issues

mktime() causes crashing, memory leak??? We’ve found on the ESP32 that using this would cause inexplicable runtime crashing : Changing the definition to this sovled it:

Read More

struct tm

Struct tm Note:tm_year is years since 1900!!tm_month is months since January (0-11)!!Note when converting to time_t your year must be >= 1970 as time_t is usually based from 00:00, Jan 1 1970 UTC! Copy struct tm You can just use a normal equals:

Read More

UTC

UTC is the DateTime displayed in the following format: Convert UTC char string to tm and tm to a UTC formatted char string Note, strftime() returns the total number of characters written (not including the terminating null-character), or zero on error. To get a pointer to the next character in the char string being written […]

Read More

.DateTime General

Basics A time_t object is a raw system time value (typically seconds since 00:00, Jan 1 1970 UTC) A struct tm lets you work with days, hours, mins etc.

Read More