Defines date and wall-clock time APIs. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| struct | sys_date_t |
| Represents a system date and time. More... | |
Typedefs | |
| typedef struct sys_date_t | sys_date_t |
| Represents a system date and time. | |
Enumerations | |
| enum | sys_date_format_t { sys_date_format_iso8601 = 0, sys_date_format_rfc2822 = 1, sys_date_format_log = 2 } |
| Common human-readable date/time string formats. More... | |
Functions | |
Methods | |
| bool | sys_date_get_now (sys_date_t *date) |
| Get the current system date and time. More... | |
| bool | sys_date_set_now (const sys_date_t *date) |
| Set the current system date and time. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| int64_t | sys_date_compare_ns (const sys_date_t *start, const sys_date_t *end) |
| Compare two dates in nanoseconds. More... | |
| 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. More... | |
Defines date and wall-clock time APIs.
Definition in file date.h.