81 uint8_t *minutes, uint8_t *
seconds);
93 uint8_t *minutes, uint8_t *
seconds);
106 uint8_t *month, uint8_t *day, uint8_t *weekday);
119 uint8_t *month, uint8_t *day, uint8_t *weekday);
168 char *buf,
size_t buf_size);
"2026-09-06 11:37:05" - a plain, sortable form for logs/debug output, in whatever timezone tzoffset r...
struct sys_date_t sys_date_t
Represents a system date and time.
bool sys_date_get_time_local(const sys_date_t *date, uint8_t *hours, uint8_t *minutes, uint8_t *seconds)
Extract local time components from a date.
size_t sys_date_to_string(const sys_date_t *date, sys_date_format_t format, char *buf, size_t buf_size)
Format a date as a human-readable string.
bool sys_date_get_date_local(const sys_date_t *date, uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *weekday)
Extract local date components from a date.
int64_t seconds
Seconds since the Unix epoch in UTC.
bool sys_date_get_date_utc(const sys_date_t *date, uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *weekday)
Extract UTC date components from a date.
bool sys_date_set_date_utc(sys_date_t *date, uint16_t year, uint8_t month, uint8_t day)
Set UTC date components on an existing date.
bool sys_date_set_now(const sys_date_t *date)
Set the current system date and time.
bool sys_date_get_now(sys_date_t *date)
Get the current system date and time.
int32_t nanoseconds
Fractional seconds in nanoseconds.
sys_date_format_t
Common human-readable date/time string formats.
"Sun, 06 Sep 2026 11:37:05 GMT" - the HTTP-date format (RFC 7231 7.1.1.1), always rendered in UTC reg...
int32_t tzoffset
Timezone offset in seconds east of UTC.
int64_t sys_date_compare_ns(const sys_date_t *start, const sys_date_t *end)
Compare two dates in nanoseconds.
Represents a system date and time.
bool sys_date_get_time_utc(const sys_date_t *date, uint8_t *hours, uint8_t *minutes, uint8_t *seconds)
Extract UTC time components from a date.
"2026-09-06T11:37:05Z" - or, when tzoffset is non-zero, an explicit "+HH:MM"/"-HH:MM" offset instead ...
bool sys_date_set_time_utc(sys_date_t *date, uint8_t hours, uint8_t minutes, uint8_t seconds)
Set UTC time components on an existing date.