|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
timezone API More...
Functions | |
| static int8_t | utc_timezone_location_approximate (int32_t longitude) |
| Calculate the approximate UTC timezone of a location. | |
| static int16_t | utc_timezone_minutes_location_approximate (int32_t longitude) |
| Calculate the approximate UTC timezone of a location in minutes. | |
timezone API
|
inlinestatic |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/time/timezone.h>
Calculate the approximate UTC timezone of a location.
This function splits the earth into 15 degree longitude chunks to approximate the timezone without requiring any information other than the location. Due to the vagaries of actual time-zones, the true timezone offset may differ from this value by up to 3 hours (Western China).
| longitude | Longitude (scaled by 1e7) |
|
inlinestatic |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/time/timezone.h>
Calculate the approximate UTC timezone of a location in minutes.
This function splits the earth into 15 minute longitude chunks to approximate the timezone without requiring any information other than the location. Due to the vagaries of actual time-zones, the true timezone offset may differ from this value by up to 3 hours (Western China).
| longitude | Longitude (scaled by 1e7) |