#ifndef __LINUX_TZDST_H__ #define __LINUX_TZDST_H__ #include "time.h" #include "sys/cdefs.h" __BEGIN_DECLS #ifdef __XLT_OS__ /** * @ingroup localtime * @brief Set Time Zone. * * @par Description: * This API is used to set the time zone. * * @attention * * * @param buff The string point to the time zone going to be setting. * * @retval None */ void settimezone(const char *); /** * @ingroup localtime * @brief Disable daylight saving time. * * @par Description: * This API is used to make daylight saving time useless. * * @param None. * * @retval None */ int dst_disable(void); /** * @ingroup localtime * @brief Enable daylight saving time.. * * @par Description: * This API is used to configure daylight saving time. * * @attention * * * @param dst_start_time The string point to the DST start going to be setting. * @param dst_end_tme The string point to the DST end going to be setting. * @param forward_seconds Indicates the number of seconds that time is allocated when entering DST interval. * * @retval 0 Succeed. * @retval -1 Failed. */ int dst_enable(const char *dst_start_time, const char *dst_end_tme, int forward_seconds); /** * @ingroup localtime * @brief Inquire daylight saving time. * * @par Description: * This API is used to inquire daylight saving time. * * @param year Represents the year to query start from 1900. * @param dst_start Used to store daylight savings time start time * @param dst_end Used to store daylight savings time end time * * @retval 0 Succeed. * @retval -1 Failed. */ int dst_inquire(int year, struct tm *dst_start, struct tm *dst_end); #endif /* __XLT_OS__ */ __END_DECLS #endif /* __LINUX_TZDST_H__ */