TuyaOS
|
tuya time service, support UTC time, local time and summer time 更多...
结构体 | |
struct | SUM_ZONE_TBL_S |
sum zone info 更多... | |
宏定义 | |
#define | SUM_ZONE_TAB_LMT 6 |
number of time zone table | |
函数 | |
OPERATE_RET | tal_time_check_time_sync (VOID) |
check IoTOS time synchronize status 更多... | |
OPERATE_RET | tal_time_check_time_zone_sync (VOID) |
check IoTOS time zone synchronized status 更多... | |
OPERATE_RET | tal_time_get (OUT POSIX_TM_S *tm) |
get IoTOS UTC time in posix time format 更多... | |
TIME_T | tal_time_get_cur_posix (VOID) |
get IoTOS last synchronized UTC time in TIME_T format 更多... | |
OPERATE_RET | tal_time_get_local_time_custom (IN TIME_T in_time, OUT POSIX_TM_S *tm) |
get IoTOS local time (local, contains the time zone and summer time zone) 更多... | |
TIME_T | tal_time_get_posix (VOID) |
get IoTOS UTC time in TIME_T format 更多... | |
SYS_TICK_T | tal_time_get_posix_ms (VOID) |
get IoTOS UTC time in SYS_TICK_T format 更多... | |
OPERATE_RET | tal_time_get_sum_time (OUT POSIX_TM_S *tm) |
get IoTOS UTC summer time in posix time format 更多... | |
TIME_T | tal_time_get_sum_time_posix (VOID) |
get IoTOS UTC summer time int TIME_T format 更多... | |
OPERATE_RET | tal_time_get_sum_zone (OUT SUM_ZONE_TBL_S *sum_zone) |
get sum zone info 更多... | |
VOID | tal_time_get_system_time (OUT TIME_S *pSecTime, OUT TIME_MS *pMsTime) |
get IoTOS UTC time, both second and micro-second 更多... | |
OPERATE_RET | tal_time_get_time_zone_seconds (OUT INT_T *time_zone) |
get IoTOS time zone in second format 更多... | |
POSIX_TM_S * | tal_time_gmtime_r (IN CONST TIME_T *tm, OUT POSIX_TM_S *result) |
change TIME_T to posix time, redefine the std C func gmtime_r 更多... | |
BOOL_T | tal_time_is_in_sum_zone (TIME_T time) |
get IoTOS UTC summer time int TIME_T format 更多... | |
TIME_T | tal_time_mktime (IN CONST POSIX_TM_S *tm) |
change posix time to TIME_T, redefine the std C func mktime 更多... | |
OPERATE_RET | tal_time_service_init (VOID) |
time-management module initialization 更多... | |
OPERATE_RET | tal_time_set (IN CONST POSIX_TM_S *tm) |
set IoTOS UTC time 更多... | |
OPERATE_RET | tal_time_set_posix (IN CONST TIME_T time, IN CONST INT_T update_source) |
set IoTOS UTC time in time_t format 更多... | |
VOID | tal_time_set_sum_zone_tbl (IN CONST SUM_ZONE_S *zone, IN CONST UINT_T cnt) |
set IoTOS summer time zone 更多... | |
OPERATE_RET | tal_time_set_time_zone (IN CONST CHAR_T *time_zone) |
set IoTOS time zone in "+/-hh:mm" format 更多... | |
OPERATE_RET | tal_time_set_time_zone_seconds (IN INT_T time_zone_sec) |
set IoTOS time zone in second format 更多... | |
tuya time service, support UTC time, local time and summer time
OPERATE_RET tal_time_check_time_sync | ( | VOID | ) |
check IoTOS time synchronize status
OPERATE_RET tal_time_check_time_zone_sync | ( | VOID | ) |
check IoTOS time zone synchronized status
OPERATE_RET tal_time_get | ( | OUT POSIX_TM_S * | tm | ) |
get IoTOS UTC time in posix time format
[out] | tm | the IoTOS UTC time in posix time format |
TIME_T tal_time_get_cur_posix | ( | VOID | ) |
get IoTOS last synchronized UTC time in TIME_T format
OPERATE_RET tal_time_get_local_time_custom | ( | IN TIME_T | in_time, |
OUT POSIX_TM_S * | tm | ||
) |
get IoTOS local time (local, contains the time zone and summer time zone)
[in] | in_time | the time need translate |
[out] | tm | the local time in posix format |
TIME_T tal_time_get_posix | ( | VOID | ) |
get IoTOS UTC time in TIME_T format
SYS_TICK_T tal_time_get_posix_ms | ( | VOID | ) |
get IoTOS UTC time in SYS_TICK_T format
OPERATE_RET tal_time_get_sum_time | ( | OUT POSIX_TM_S * | tm | ) |
get IoTOS UTC summer time in posix time format
[out] | tm | the summer time in posix format |
TIME_T tal_time_get_sum_time_posix | ( | VOID | ) |
get IoTOS UTC summer time int TIME_T format
OPERATE_RET tal_time_get_sum_zone | ( | OUT SUM_ZONE_TBL_S * | sum_zone | ) |
get sum zone info
[out] | sum | zone info |
VOID tal_time_get_system_time | ( | OUT TIME_S * | pSecTime, |
OUT TIME_MS * | pMsTime | ||
) |
get IoTOS UTC time, both second and micro-second
[out] | pSecTime | the current time in second |
[out] | pMsTime | the current time in micro-second |
OPERATE_RET tal_time_get_time_zone_seconds | ( | OUT INT_T * | time_zone | ) |
get IoTOS time zone in second format
[out] | time_zone | the current time zone in second format |
POSIX_TM_S * tal_time_gmtime_r | ( | IN CONST TIME_T * | tm, |
OUT POSIX_TM_S * | result | ||
) |
change TIME_T to posix time, redefine the std C func gmtime_r
[in] | tm | the time in TIME_T format |
[out] | result | the time in posix time format |
BOOL_T tal_time_is_in_sum_zone | ( | TIME_T | time | ) |
get IoTOS UTC summer time int TIME_T format
TIME_T tal_time_mktime | ( | IN CONST POSIX_TM_S * | tm | ) |
change posix time to TIME_T, redefine the std C func mktime
[in] | tm | the time in posix time format |
OPERATE_RET tal_time_service_init | ( | VOID | ) |
time-management module initialization
OPERATE_RET tal_time_set | ( | IN CONST POSIX_TM_S * | tm | ) |
set IoTOS UTC time
[in] | tm | the new time in posix time format |
OPERATE_RET tal_time_set_posix | ( | IN CONST TIME_T | time, |
IN CONST INT_T | update_source | ||
) |
set IoTOS UTC time in time_t format
[in] | time | the new time in time_t format |
[in] | update_source | the source of time (0:rtc 1:cloud 2:other) |
VOID tal_time_set_sum_zone_tbl | ( | IN CONST SUM_ZONE_S * | zone, |
IN CONST UINT_T | cnt | ||
) |
set IoTOS summer time zone
[in] | zone | the summer time zone table |
[in] | cnt | the summer time counts |
OPERATE_RET tal_time_set_time_zone | ( | IN CONST CHAR_T * | time_zone | ) |
set IoTOS time zone in "+/-hh:mm" format
[in] | time_zone | the new time zone in "+/-hh:mm" format |
OPERATE_RET tal_time_set_time_zone_seconds | ( | IN INT_T | time_zone_sec | ) |
set IoTOS time zone in second format
[in] | time_zone | the new time zone in second format |