1 .\" %%%LICENSE_START(PUBLIC_DOMAIN)
2 .\" This file is in the public domain, so clarified as of
3 .\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
6 .TH TZFILE 5 2019-03-06 "" "Linux Programmer's Manual"
8 tzfile \- timezone information
10 .ie '\(lq'' .ds lq \&"\"
12 .ie '\(rq'' .ds rq \&"\"
15 \\$3\*(lq\\$1\*(rq\\$2
17 The timezone information files used by
19 are typically found under a directory with a name like
20 .IR /usr/share/zoneinfo .
21 These files begin with a 44-byte header containing the following fields:
23 The magic four-byte ASCII sequence
25 identifies the file as a timezone information file.
27 A byte identifying the version of the file's format
28 (as of 2017, either an ASCII NUL, or
33 Fifteen bytes containing zeros reserved for future use.
35 Six four-byte integer values
36 written in a standard byte order
37 (the high-order byte of the value is written first).
43 The number of UT/local indicators stored in the file.
46 The number of standard/wall indicators stored in the file.
49 The number of leap seconds for which data entries are stored in the file.
52 The number of transition times for which data entries are stored
56 The number of local time types for which data entries are stored
57 in the file (must not be zero).
60 The number of bytes of time zone abbreviation strings
64 The above header is followed by the following fields, whose lengths
65 depend on the contents of the header:
68 four-byte signed integer values sorted in ascending order.
69 These values are written in standard byte order.
70 Each is used as a transition time (as returned by
72 at which the rules for computing local time change.
75 one-byte unsigned integer values;
76 each one but the last tells which of the different types of local time types
77 described in the file is associated with the time period
78 starting with the same-indexed transition time
79 and continuing up to but not including the next transition time.
80 (The last time type is present only for consistency checking with the
81 POSIX-style TZ string described below.)
82 These values serve as indices into the next field.
86 entries, each defined as follows:
90 .ta .5i +\w'unsigned char\0\0'u
93 unsigned char tt_isdst;
94 unsigned char tt_abbrind;
99 Each structure is written as a four-byte signed integer value for
101 in a standard byte order, followed by a one-byte value for
103 and a one-byte value for
107 gives the number of seconds to be added to UT,
115 serves as an index into the array of time zone abbreviation bytes
118 structure(s) in the file.
121 pairs of four-byte values, written in standard byte order;
122 the first value of each pair gives the nonnegative time
125 at which a leap second occurs;
128 number of leap seconds to be applied during the time period
129 starting at the given time.
130 The pairs of values are sorted in ascending order by time.
131 Each transition is for one leap second, either positive or negative;
132 transitions always separated by at least 28 days minus 1 second.
135 standard/wall indicators, each stored as a one-byte value;
136 they tell whether the transition times associated with local time types
137 were specified as standard time or wall clock time,
138 and are used when a timezone file is used in handling POSIX-style
139 timezone environment variables.
142 UT/local indicators, each stored as a one-byte value;
143 they tell whether the transition times associated with local time types
144 were specified as UT or local time,
145 and are used when a timezone file is used in handling POSIX-style
146 timezone environment variables.
151 uses the first standard-time
153 structure in the file
156 structure in the absence of a standard-time structure)
159 is zero or the time argument is less than the first transition time recorded
162 For version-2-format timezone files,
163 the above header and data are followed by a second header and data,
164 identical in format except that
165 eight bytes are used for each transition time or leap second time.
166 (Leap second counts remain four bytes.)
167 After the second header and data comes a newline-enclosed,
168 POSIX-TZ-environment-variable-style string for use in handling instants
169 after the last transition time stored in the file
170 or for all instants if the file has no transitions.
171 The POSIX-style TZ string is empty (i.e., nothing between the newlines)
172 if there is no POSIX representation for such instants.
173 If nonempty, the POSIX-style TZ string must agree with the local time
174 type after the last transition time if present in the eight-byte data;
175 for example, given the string
176 .q "WET0WEST,M3.5.0,M10.5.0/3"
177 then if a last transition time is in July, the transition's local time
178 type must specify a daylight-saving time abbreviated
180 that is one hour east of UT.
181 Also, if there is at least one transition, time type 0 is associated
182 with the time period from the indefinite past up to but not including
183 the earliest transition time.
185 For version-3-format timezone files, the POSIX-TZ-style string may
186 use two minor extensions to the POSIX TZ format, as described in
188 First, the hours part of its transition times may be signed and range from
189 \-167 through 167 instead of the POSIX-required unsigned values
191 Second, DST is in effect all year if it starts
192 January 1 at 00:00 and ends December 31 at 24:00 plus the difference
193 between daylight saving and standard time.
195 Future changes to the format may append more data.
203 .\" This file is in the public domain, so clarified as of
204 .\" 1996-06-05 by Arthur David Olson.