11#ifndef __TAL_TIME_SERVICE_H__
12#define __TAL_TIME_SERVICE_H__
14#include "tuya_cloud_types.h"
49#define SUM_ZONE_TAB_LMT 6
posix time
Definition: tal_time_service.h:26
summer time zone
Definition: tal_time_service.h:40
sum zone info
Definition: tal_time_service.h:55
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
OPERATE_RET tal_time_get(OUT POSIX_TM_S *tm)
get IoTOS UTC time in posix time 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_check_time_sync(VOID)
check IoTOS time synchronize status
TIME_T tal_time_mktime(IN CONST POSIX_TM_S *tm)
change posix time to TIME_T, redefine the std C func mktime
TIME_T tal_time_get_posix(VOID)
get IoTOS UTC time in TIME_T format
OPERATE_RET tal_time_get_sum_time(OUT POSIX_TM_S *tm)
get IoTOS UTC summer time in posix time format
OPERATE_RET tal_time_set(IN CONST POSIX_TM_S *tm)
set IoTOS UTC time
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
OPERATE_RET tal_time_check_time_zone_sync(VOID)
check IoTOS time zone synchronized status
OPERATE_RET tal_time_get_sum_zone(OUT SUM_ZONE_TBL_S *sum_zone)
get sum zone info
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_get_time_zone_seconds(OUT INT_T *time_zone)
get IoTOS time zone in second 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_get_sum_time_posix(VOID)
get IoTOS UTC summer time int TIME_T format
OPERATE_RET tal_time_service_init(VOID)
time-management module initialization
#define SUM_ZONE_TAB_LMT
number of time zone table
Definition: tal_time_service.h:49
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)
OPERATE_RET tal_time_set_time_zone_seconds(IN INT_T time_zone_sec)
set IoTOS time zone in second format
TIME_T tal_time_get_cur_posix(VOID)
get IoTOS last synchronized UTC time in TIME_T format
VOID tal_time_get_system_time(OUT TIME_S *pSecTime, OUT TIME_MS *pMsTime)
get IoTOS UTC time, both second and micro-second
SYS_TICK_T tal_time_get_posix_ms(VOID)
get IoTOS UTC time in SYS_TICK_T format