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>.
4 .TH TZFILE 5 2010-08-31 "" "Linux Programmer's Manual"
6 tzfile \- timezone information
10 The timezone information files used by
12 begin with the magic characters "TZif" to identify then as
13 timezone information files,
14 followed by a character identifying the version of the file's format
15 (as of 2005, either an ASCII NUL ('\\0') or a '2')
16 followed by fifteen bytes containing zeroes reserved for future use,
17 followed by six four-byte values of type
19 written in a "standard" byte order
20 (the high-order byte of the value is written first).
25 The number of UTC/local indicators stored in the file.
28 The number of standard/wall indicators stored in the file.
31 The number of leap seconds for which data is stored in the file.
34 The number of "transition times" for which data is stored
38 The number of "local time types" for which data is stored
39 in the file (must not be zero).
42 The number of characters of "timezone abbreviation strings"
45 The above header is followed by
47 four-byte values of type
49 sorted in ascending order.
50 These values are written in "standard" byte order.
51 Each is used as a transition time (as returned by
53 at which the rules for computing local time change.
56 one-byte values of type
58 each one tells which of the different types of "local time" types
59 described in the file is associated with the same-indexed transition time.
60 These values serve as indices into an array of
64 entries) that appear next in the file;
65 these structures are defined as follows:
72 unsigned int tt_abbrind;
77 Each structure is written as a four-byte value for
81 in a standard byte order, followed by a one-byte value for
83 and a one-byte value for
87 gives the number of seconds to be added to UTC,
95 serves as an index into the array of timezone abbreviation characters
98 structure(s) in the file.
102 pairs of four-byte values, written in standard byte order;
103 the first value of each pair gives the time
106 at which a leap second occurs;
109 number of leap seconds to be applied after the given time.
110 The pairs of values are sorted in ascending order by time.
114 standard/wall indicators, each stored as a one-byte value;
115 they tell whether the transition times associated with local time types
116 were specified as standard time or wall clock time,
117 and are used when a timezone file is used in handling POSIX-style
118 timezone environment variables.
122 UTC/local indicators, each stored as a one-byte value;
123 they tell whether the transition times associated with local time types
124 were specified as UTC or local time,
125 and are used when a timezone file is used in handling POSIX-style
126 timezone environment variables.
129 uses the first standard-time
131 structure in the file
134 structure in the absence of a standard-time structure)
137 is zero or the time argument is less than the first transition time recorded
140 For version-2-format timezone files,
141 the above header and data is followed by a second header and data,
142 identical in format except that
143 eight bytes are used for each transition time or leap-second time.
144 After the second header and data comes a newline-enclosed,
145 POSIX-TZ-environment-variable-style string for use in handling instants
146 after the last transition time stored in the file
147 (with nothing between the newlines if there is no POSIX representation for