#include <zephyr/types.h>
#include <stdbool.h>
#include <time.h>
Go to the source code of this file.
|
| int | date_time_set (const struct tm *new_date_time) |
| | Set the current date time.
|
| |
| int | date_time_uptime_to_unix_time_ms (int64_t *uptime) |
| | Get the date time UTC when the passing variable uptime was set. This function requires that k_uptime_get() has been called on the passing variable uptime prior to the function call. In that case the uptime will not be too large or negative.
|
| |
| int | date_time_now (int64_t *unix_time_ms) |
| | Get the current date time UTC.
|
| |
| int | date_time_now_local (int64_t *local_time_ms) |
| | Get the current date time in local time.
|
| |
| bool | date_time_is_valid (void) |
| | Convenience function that checks if the library has obtained an initial valid date time.
|
| |
| bool | date_time_is_valid_local (void) |
| | Check if the library has obtained an initial valid date time and timezone.
|
| |
| void | date_time_register_handler (date_time_evt_handler_t evt_handler) |
| | Register an event handler for Date time library events.
|
| |
| int | date_time_update_async (date_time_evt_handler_t evt_handler) |
| | Asynchronous update of internal date time UTC. This function initiates a date time update regardless of the internal update interval. If an event handler is provided it will be updated with library events, accordingly.
|
| |
| void | date_time_clear (void) |
| | Clear the current date time held by the library.
|
| |
| int | date_time_timestamp_clear (int64_t *unix_timestamp) |
| | Clear a timestamp in UNIX time ms.
|
| |