1 .\" $NetBSD: tzfile.5,v 1.20 2013/09/20 19:06:54 christos Exp $
3 .\" This file is in the public domain, so clarified as of
4 .\" 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
10 .Nd time zone information
14 The time zone information files used by
16 begin with the magic characters
18 to identify them as time zone information files,
19 followed by a character identifying the version of the file's format
20 (as of 2013, either an ASCII NUL or a '2', or '3')
21 followed by fifteen bytes containing zeroes reserved for future use,
22 followed by six four-byte values of type
24 followed by six four-byte integer values written in a
26 byte order (the high-order byte of the value is written first).
27 These values are, in order:
28 .Bl -tag -width XXXXXX -compact
30 The number of UT/local indicators stored in the file.
32 The number of standard/wall indicators stored in the file.
34 The number of leap seconds for which data is stored in the file.
38 for which data is stored in the file.
42 for which data is stored in the file (must not be zero).
44 The number of characters of "time zone abbreviation strings"
48 The above header is followed by
50 four-byte signed integer values sorted in ascending order.
51 These values are written in
52 These values are written in
55 Each is used as a transition time (as returned by
57 at which the rules for computing local time change.
60 one-byte unsigned integer values;
61 each one tells which of the different types of
63 types described in the file is associated with the same-indexed
65 These values serve as indices into an array of
69 entries) that appears next in the file;
70 these structures are defined as follows:
74 unsigned char tt_isdst;
75 unsigned char tt_abbrind;
78 Each structure is written as a four-byte signed integer value for
80 in a standard byte order, followed by a one-byte value for
82 and a one-byte value for
86 gives the number of seconds to be added to UT,
94 serves as an index into the array of time zone abbreviation characters
97 structure(s) in the file.
101 pairs of four-byte values, written in standard byte order;
102 the first value of each pair gives the time
105 at which a leap second occurs;
108 number of leap seconds to be applied after the given time.
109 The pairs of values are sorted in ascending order by time.
113 standard/wall indicators, each stored as a one-byte value;
114 they tell whether the transition times associated with local time types
115 were specified as standard time or wall clock time,
116 and are used when a time zone file is used in handling POSIX-style
117 time zone environment variables.
121 UT/local indicators, each stored as a one-byte value;
122 they tell whether the transition times associated with local time types
123 were specified as UT or local time,
124 and are used when a time zone file is used in handling POSIX-style
125 time zone environment variables.
128 uses the first standard-time
130 structure in the file
133 structure in the absence of a standard-time structure)
136 is zero or the time argument is less than the first transition time recorded
139 For version-2-format time zone files,
140 the above header and data are followed by a second header and data,
141 identical in format except that
142 eight bytes are used for each transition time or leap second time.
143 After the second header and data comes a newline-enclosed,
144 POSIX-TZ-environment-variable-style string for use in handling instants
145 after the last transition time stored in the file
146 (with nothing between the newlines if there is no POSIX representation for
149 For version-3-format time zone files, the POSIX-TZ-style string may
150 use two minor extensions to the POSIX TZ format, as described in
152 First, the hours part of its transition times may be signed and range from
153 \(mi167 through 167 instead of the POSIX-required unsigned values
155 Second, DST is in effect all year if it starts
156 January 1 at 00:00 and ends December 31 at 24:00 plus the difference
157 between daylight saving and standard time.
159 Future changes to the format may append more data.
168 .\" This file is in the public domain, so clarified as of
169 .\" 1996-06-05 by Arthur David Olson.