linux TZ格式

man tzset可以很清楚了解时区设置格式,共3种:

The first format is used when there is no daylight saving time in the local timezone:
              std offset

The second format is used when there is daylight saving time:
              std offset dst [offset],start[/time],end[/time]

The third format specifies that the timezone information should be read from a file:
              :[filespec]
常用是前两种格式。

The std string specifies the name of the timezone and must be three or more  alphabetic  characters.
The offset string immediately follows std and specifies the time value to be added to the local time to get Coordinated Universal Time (UTC). 

The offset is positive if the local timezone  is  west  of the  Prime  Meridian and negative if it is east.  The hour must be between 0 and 24, and the minutes and seconds 0 and 59.
std offset没有夏令时的时区格式,即一个名称加上与UTC的时间差值,就是说,当地时间加上时间差就得到UTC时间。如果时间差为正数,则时区位于本初子午线 (Prime Meridian)之西(西几区),如果是负数,则时区位于本初子午线之东(东几区),见加粗部分字体。所以CST6CDT是西六区的时区名称。——因为 西六区加上6小时,正是UTC时间。CST-8是东八区,因为东八区减去8小时刚好是UTC时间

POSIX格式的时区介绍:http://www.ibm.com/developerworks/aix/library/au-aix-posix/index.html

GNU关于TZ变量的介绍:http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html

世界时区介绍、简写等:http://www.timeanddate.com/time/zones/

 

参考:

linux下时区的一些认识

posted @ 2017-06-27 23:59  yuxi_o  阅读(4033)  评论(0编辑  收藏  举报