6 #ifndef EMX_TimeZone_HPP
7 #define EMX_TimeZone_HPP
18 TimeZone() { memset(m_zone, 0,
sizeof(m_zone)); }
44 char *
Get() {
return m_zone; }
53 void GetZoneListDir(
const char *path,
const std::string &name, std::vector<std::string> &list);
107 static ErrCodeE Load(ZoneParam ¶m);
108 static ErrCodeE GenerateLocaltime(
const ZoneParam ¶m);
根据用户输入的GMT时区信息和夏令时信息自动生成时区文件并配置localtime
Definition: TimeZone.hpp:59
TimeZone2()
Definition: TimeZone.hpp:88
static ErrCodeE InitDeviceTimeZone()
virtual ~TimeZone2()
Definition: TimeZone.hpp:89
static ErrCodeE Get(ZoneParam ¶m)
获取当前时区参数
Definition: TimeZone.hpp:104
static ErrCodeE Set(const ZoneParam ¶m)
设置系统时区
Definition: TimeZone.hpp:16
void GetZoneList(std::vector< std::string > &list)
获取时区文件列表
static const int MaxZoneSize
zone字符串最大大小
Definition: TimeZone.hpp:20
TimeZone()
Definition: TimeZone.hpp:18
ErrCodeE CopyTimeZoneToLocalTime()
将zone.json中的时区复制到localtime文件
ErrCodeE Load()
从flash中加载参数
ErrCodeE Set(const char *zone)
设置系统时区(更改zone.json同时配置时区文件)
char * Get()
获取当前时区文件名
Definition: TimeZone.hpp:44
ErrCodeE
错误码定义
Definition: EmxTypeDef.hpp:29
Definition: EmxGpio.hpp:10
Definition: TimeZone.hpp:74
char in[4]
Definition: TimeZone.hpp:75
char at[8]
Definition: TimeZone.hpp:77
char on[12]
Definition: TimeZone.hpp:76
Definition: TimeZone.hpp:71
struct Emx::TimeZone2::ZoneParam::Daylight::Rule into
struct Emx::TimeZone2::ZoneParam::Daylight::Rule leave
bool ena
Definition: TimeZone.hpp:72
char save[8]
Definition: TimeZone.hpp:73
Definition: TimeZone.hpp:69
char gmt[12]
Definition: TimeZone.hpp:70
struct Emx::TimeZone2::ZoneParam::Daylight daylight