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 2012-05-04 "" "Linux Programmer's Manual"
10 tzfile \- timezone information
12 This page describes the structure of the timezone files used by
14 These files are typically found under one of the directories
17 .IR /usr/share/zoneinfo .
19 Timezone information files
20 begin with the magic characters "TZif" to identify them as
21 timezone information files,
22 followed by a character identifying the version of the file's format
23 (as of 2005, either an ASCII NUL (\(aq\\0\(aq) or a \(aq2\(aq)
24 followed by fifteen bytes containing zeros reserved for future use,
25 followed by six four-byte values of type
27 written in a "standard" byte order
28 (the high-order byte of the value is written first).
33 The number of UTC/local indicators stored in the file.
36 The number of standard/wall indicators stored in the file.
39 The number of leap seconds for which data is stored in the file.
42 The number of "transition times" for which data is stored
46 The number of "local time types" for which data is stored
47 in the file (must not be zero).
50 The number of characters of "timezone abbreviation strings"
53 The above header is followed by
55 four-byte values of type
57 sorted in ascending order.
58 These values are written in "standard" byte order.
59 Each is used as a transition time (as returned by
61 at which the rules for computing local time change.
64 one-byte values of type
66 each one tells which of the different types of "local time" types
67 described in the file is associated with the same-indexed transition time.
68 These values serve as indices into an array of
72 entries) that appear next in the file;
73 these structures are defined as follows:
80 unsigned int tt_abbrind;
85 Each structure is written as a four-byte value for
89 in a standard byte order, followed by a one-byte value for
91 and a one-byte value for
95 gives the number of seconds to be added to UTC,
103 serves as an index into the array of timezone abbreviation characters
106 structure(s) in the file.
110 pairs of four-byte values, written in standard byte order;
111 the first value of each pair gives the time
114 at which a leap second occurs;
117 number of leap seconds to be applied after the given time.
118 The pairs of values are sorted in ascending order by time.
122 standard/wall indicators, each stored as a one-byte value;
123 they tell whether the transition times associated with local time types
124 were specified as standard time or wall clock time,
125 and are used when a timezone file is used in handling POSIX-style
126 timezone environment variables.
130 UTC/local indicators, each stored as a one-byte value;
131 they tell whether the transition times associated with local time types
132 were specified as UTC or local time,
133 and are used when a timezone file is used in handling POSIX-style
134 timezone environment variables.
137 uses the first standard-time
139 structure in the file
142 structure in the absence of a standard-time structure)
145 is zero or the time argument is less than the first transition time recorded
148 For version-2-format timezone files,
149 the above header and data is followed by a second header and data,
150 identical in format except that
151 eight bytes are used for each transition time or leap-second time.
152 After the second header and data comes a newline-enclosed,
153 POSIX-TZ-environment-variable-style string for use in handling instants
154 after the last transition time stored in the file
155 (with nothing between the newlines if there is no POSIX representation for
163 in the glibc source tree