tzfile.5

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 5 代码 · 共 86 行

5
86
字号
.TH tzfile 5.SH Nametzfile \- time zone information.SH Syntax.B #include <tzfile.h>.SH DescriptionThe time zone information files used by.PN tzsetbegin with bytes reserved for future use,followed by three 4-byte values of type``long'', written in a ``standard'' byte order(the high-order byte of the value is written first).These values are,in order:.IP tzh_timecnt 15The number of transition times for which data is storedin the file..IP tzh_typecntThe number of local time types for which data is storedin the file (must not be zero)..IP tzh_charcntThe number of characters of ``time zone abbreviation strings''stored in the file..IPThis header is followed by.PN tzh_timecnt4-byte values of type ``long'',sorted in ascending order.These values are written in ``standard'' byte order.Each is used as a transition time (as returned by.PN timeat which the rules for computing local time change).Next come.PN tzh_timecnt1-byte values of type ``unsigned char''.Each one tells which of the different types of local time typesdescribed in the file is associated with the same-indexed transition time.These values serve as indices into an array of.I ttinfostructures that appears next in the file; these structures are defined as follows:.EXstruct ttinfo {		long          tt_gmtoff;	int           tt_isdst;	unsigned int  tt_abbrind;};.EEEach structure is written as a 4-byte value for.PN tt_gmtoffof type ``long'',in a standard byte order, followed by a 1-byte value for.PN tt_isdstand a 1-byte value for.PN tt_abbrind .In each structure,.PN tt_gmtoffgives the number of seconds to be added to GMT,.PN tt_isdsttells whether.PN tm_isdstshould be set by.PN localtimeand.PN tt_abbrindserves as an index into the array of time zone abbreviation charactersthat follows the.PN ttinfostructure or structures in the file..PPThe.PN localtimecall uses the first standard-time.PN ttinfostructure in the file(or simply the first.PN ttinfostructure, in the absence of a standard-time structure)if either.PN tzh_timecntis zero or the time argument is less than the first transition time recordedin the file..SH See Alsoctime(3)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?