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>.
8 .TH TZFILE 5 2017-08-04 "" "Linux Programmer's Manual"
10 tzfile \- time zone information
12 .ie '\(lq'' .ds lq \&"\"
14 .ie '\(rq'' .ds rq \&"\"
17 \\$3\*(lq\\$1\*(rq\\$2
19 The time zone information files used by
21 are typically found under a directory with a name like
22 .IR /usr/share/zoneinfo .
23 These files begin with a 44-byte header containing the following fields:
25 The magic four-byte ASCII sequence
27 identifies the file as a time zone information file.
29 A byte identifying the version of the file's format
30 (as of 2017, either an ASCII NUL, or
35 Fifteen bytes containing zeros reserved for future use.
37 Six four-byte integer values
38 written in a standard byte order
39 (the high-order byte of the value is written first).
45 The number of UT/local indicators stored in the file.
48 The number of standard/wall indicators stored in the file.
51 The number of leap seconds for which data entries are stored in the file.
54 The number of transition times for which data entries are stored
58 The number of local time types for which data entries are stored
59 in the file (must not be zero).
62 The number of bytes of time zone abbreviation strings
66 The above header is followed by the following fields, whose lengths
67 vary depend on the contents of the header:
70 four-byte signed integer values sorted in ascending order.
71 These values are written in standard byte order.
72 Each is used as a transition time (as returned by
74 at which the rules for computing local time change.
77 one-byte unsigned integer values;
78 each one tells which of the different types of local time types
79 described in the file is associated with the time period
80 starting with the same-indexed transition time.
81 These values serve as indices into the next field.
85 entries, each defined as follows:
89 .ta .5i +\w'unsigned char\0\0'u
92 unsigned char tt_isdst;
93 unsigned char tt_abbrind;
98 Each structure is written as a four-byte signed integer value for
100 in a standard byte order, followed by a one-byte value for
102 and a one-byte value for
106 gives the number of seconds to be added to UT,
114 serves as an index into the array of time zone abbreviation bytes
117 structure(s) in the file.
120 pairs of four-byte values, written in standard byte order;
121 the first value of each pair gives the nonnegative time
124 at which a leap second occurs;
127 number of leap seconds to be applied during the time period
128 starting at the given time.
129 The pairs of values are sorted in ascending order by time.
130 Each transition is for one leap second, either positive or negative;
131 transitions always separated by at least 28 days minus 1 second.
134 standard/wall indicators, each stored as a one-byte value;
135 they tell whether the transition times associated with local time types
136 were specified as standard time or wall clock time,
137 and are used when a time zone file is used in handling POSIX-style
138 time zone environment variables.
141 UT/local indicators, each stored as a one-byte value;
142 they tell whether the transition times associated with local time types
143 were specified as UT or local time,
144 and are used when a time zone file is used in handling POSIX-style
145 time zone environment variables.
150 uses the first standard-time
152 structure in the file
155 structure in the absence of a standard-time structure)
158 is zero or the time argument is less than the first transition time recorded
161 For version-2-format time zone files,
162 the above header and data are followed by a second header and data,
163 identical in format except that
164 eight bytes are used for each transition time or leap second time.
165 (Leap second counts remain four bytes.)
166 After the second header and data comes a newline-enclosed,
167 POSIX-TZ-environment-variable-style string for use in handling instants
168 after the last transition time stored in the file
169 (with nothing between the newlines if there is no POSIX representation for
171 The POSIX-style string must agree with the local time type after
172 both data's last transition times; for example, given the string
173 .q "WET0WEST,M3.5.0,M10.5.0/3"
174 then if a last transition time is in July, the transition's local time
175 type must specify a daylight-saving time abbreviated
177 that is one hour east of UT.
179 For version-3-format time zone files, the POSIX-TZ-style string may
180 use two minor extensions to the POSIX TZ format, as described in
182 First, the hours part of its transition times may be signed and range from
183 \-167 through 167 instead of the POSIX-required unsigned values
184 from 0 through 24. Second, DST is in effect all year if it starts
185 January 1 at 00:00 and ends December 31 at 24:00 plus the difference
186 between daylight saving and standard time.
188 Future changes to the format may append more data.
196 .\" This file is in the public domain, so clarified as of
197 .\" 1996-06-05 by Arthur David Olson.