日期:2014-05-16  浏览次数:20739 次

linux时区文件例子
1.时区文件(名字:OStimezone.infile)
Rule CGPTZDST  1970    1970     -  Jan 1   0:0:0        0:0:0 -  
Zone IMS/CGP        3:30:0     -     CGP    1970    Jan 1   0:0:0  
3:30:0 CGPTZDST  CGP    2037    Dec 31   23:59:59  
3:30:0     -     CGP
   Link  IMS/CGP  CGP
2.编译
zic OStimezone.infile

3.设置:
ln -sf /usr/share/zoneinfo/IMS/CGP /etc/localtime

4.查看
zdump -v /usr/share/zoneinfo/IMS/CGP
/usr/share/zoneinfo/IMS/MEDIAX  Fri Dec 13 20:45:52 1901 UTC = Sat Dec 14 00:15:52 1901 MEDIAX isdst=0
/usr/share/zoneinfo/IMS/MEDIAX  Sat Dec 14 20:45:52 1901 UTC = Sun Dec 15 00:15:52 1901 MEDIAX isdst=0
/usr/share/zoneinfo/IMS/MEDIAX  Wed Dec 31 20:29:59 1969 UTC = Wed Dec 31 23:59:59 1969 MEDIAX isdst=0
/usr/share/zoneinfo/IMS/MEDIAX  Wed Dec 31 20:30:00 1969 UTC = Thu Jan  1 04:30:00 1970 MEDIAX isdst=0
/usr/share/zoneinfo/IMS/MEDIAX  Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 11:14:07 2038 MEDIAX isdst=0
/usr/share/zoneinfo/IMS/MEDIAX  Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 11:14:07 2038 MEDIAX isdst=0