学习分析tzfile
文件结构
Head:
tzh_ttisgmtcnt
transition times: long * tzh_timecnt 按时间升序排列
local time type: unsigned char * tzh_timecnt 这里的数据是ttinfo数组的指数,指明用哪个ttinfo结构的数据
ttinfo:
struct ttinfo {
long tt_gmtoff;
int tt_isdst;
unsigned int tt_abbrind;
};
leap second(闰秒): four-byte * tzh_leapcnt * 2
第一个是闰秒发生时间 ,第二个是应用的时间上的闰秒总数。这对闰秒数据是按时间升序排列。
standard/wall indicators:
one-byte * tzh_ttisstdcnt 指明transition time是否作为标准或者挂钟时间
UTC/local indicators: one-byte * tzh_ttisgmtcnt 指明transition time是否作为UTC或者本地时间
tzif2:最后会有个POSIX时区字符串
日期开始从周一开始,周日结束
Transition time 的DST开始时间需要减去1小时,在结束时间加上1小时

1605

被折叠的 条评论
为什么被折叠?



