127 uint8_t *day, uint8_t *weekday);
146 uint8_t *day, uint8_t *weekday);
bool sys_date_get_date_utc(sys_date_t *date, uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *weekday)
Extracts date components from a sys_date_t structure.
int64_t sys_date_compare_ns(const sys_date_t *start, const sys_date_t *end)
Calculate the difference in nanoseconds between two sys_date_t structures.
bool sys_date_get_date_local(sys_date_t *date, uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *weekday)
Extracts date components from a sys_date_t structure.
int64_t seconds
Seconds since Unix epoch (January 1, 1970 00:00:00 UTC)
struct sys_date_t sys_date_t
Represents a system date and time structure.
bool sys_date_set_time_utc(sys_date_t *date, uint8_t hours, uint8_t minutes, uint8_t seconds)
Sets time components in a sys_date_t structure, preserving the date and timezone offset.
int32_t nanoseconds
Fractional seconds in nanoseconds (0-999999999)
bool sys_date_set_date_utc(sys_date_t *date, uint16_t year, uint8_t month, uint8_t day)
Sets date components in a sys_date_t structure, preserving the time and timezone offset.
bool sys_date_set_now(const sys_date_t *date)
Sets the current system time.
bool sys_date_get_time_utc(sys_date_t *date, uint8_t *hours, uint8_t *minutes, uint8_t *seconds)
Extracts time components from a sys_date_t structure.
int32_t tzoffset
Timezone offset in seconds from UTC (positive = east of UTC)
bool sys_date_get_time_local(sys_date_t *date, uint8_t *hours, uint8_t *minutes, uint8_t *seconds)
Extracts time components from a sys_date_t structure.
Represents a system date and time structure.
bool sys_date_get_now(sys_date_t *date)
Gets the current system time.
uint64_t sys_date_get_timestamp()
Gets the number of milliseconds since the process started.