|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
location_timezone API More...
Functions | |
| int | location_timezone (int8_t *timezone) |
| Get the current approximate UTC timezone. | |
| int | location_local_time (uint32_t *local_time_seconds) |
| Get the current approximate local time. | |
location_timezone API
| int location_local_time | ( | uint32_t * | local_time_seconds | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/auto/location_timezone.h>
Get the current approximate local time.
The local time is defined such that (local_time_seconds % SEC_PER_DAY) == 0 at a time approximately equal to midnight. How far away from midnight this actually occurs depends on the difference between the output of location_timezone and the true timezone.
| local_time_seconds | Output local time |
| 0 | Local time queried successfully |
| -EAGAIN | Local timezone is not known |
| int location_timezone | ( | int8_t * | timezone | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/auto/location_timezone.h>
Get the current approximate UTC timezone.
| timezone | Output UTC timezone in hours |
| 0 | Local time queried successfully |
| -EAGAIN | Local timezone is not known |