首页 > 系统服务 > 详细

linux TZ格式

时间:2017-06-28 01:14:37      阅读:379      评论:0      收藏:0      [点我收藏+]

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下时区的一些认识

linux TZ格式

原文:http://www.cnblogs.com/embedded-linux/p/7087778.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!