1 .\" $FreeBSD: head/contrib/tzcode/stdtime/tzfile.5 200832 2009-12-22 11:17:10Z edwin $
7 .Nd timezone information
11 The time zone information files used by
13 begin with the magic characters
16 time zone information files,
17 followed by a character identifying the version of the file's format
18 (as of 2013, either an ASCII
24 followed by fifteen bytes containing zeroes reserved for future use,
25 followed by six four-byte integer values
29 (the high-order byte of the value is written first).
33 .Bl -tag -compact -width tzh_ttisstdcnt
35 The number of UT/local indicators stored in the file.
37 The number of standard/wall indicators stored in the file.
39 The number of leap seconds for which data is stored in the file.
43 for which data is stored
48 for which data is stored
49 in the file (must not be zero).
51 The number of characters of
52 .Dq time zone abbreviation strings
56 The above header is followed by
58 four-byte signed integer values sorted in ascending order.
59 These values are written in
62 Each is used as a transition time (as returned by
64 at which the rules for computing local time change.
67 one-byte unsigned integer values;
68 each one tells which of the different types of
71 described in the file is associated with the same-indexed transition time.
72 These values serve as indices into an array of
76 entries) that appears next in the file;
77 these structures are defined as follows:
78 .Bd -literal -offset indent
81 unsigned char tt_isdst;
82 unsigned char tt_abbrind;
86 Each structure is written as a four-byte signed integer value for
88 in a standard byte order, followed by a one-byte value for
90 and a one-byte value for
94 gives the number of seconds to be added to UT,
102 serves as an index into the array of time zone abbreviation characters
105 structure(s) in the file.
109 pairs of four-byte values, written in standard byte order;
110 the first value of each pair gives the time
113 at which a leap second occurs;
116 number of leap seconds to be applied after the given time.
117 The pairs of values are sorted in ascending order by time.
121 standard/wall indicators, each stored as a one-byte value;
122 they tell whether the transition times associated with local time types
123 were specified as standard time or wall clock time,
124 and are used when a time zone file is used in handling POSIX-style
125 time zone environment variables.
129 UT/local indicators, each stored as a one-byte value;
130 they tell whether the transition times associated with local time types
131 were specified as UT or local time,
132 and are used when a time zone file is used in handling POSIX-style
133 time zone environment variables.
136 uses the first standard-time
138 structure in the file
141 structure in the absence of a standard-time structure)
144 is zero or the time argument is less than the first transition time recorded
147 For version-2-format time zone files,
148 the above header and data are followed by a second header and data,
149 identical in format except that eight bytes are used for each
150 transition time or leap second time.
151 After the second header and data comes a newline-enclosed,
152 POSIX-TZ-environment-variable-style string for use in handling instants
153 after the last transition time stored in the file
154 (with nothing between the newlines if there is no POSIX representation for
157 For version-3-format time zone files, the POSIX-TZ-style string may
158 use two minor extensions to the POSIX TZ format, as described in
160 First, the hours part of its transition times may be signed and range from
161 -167 through 167 instead of the POSIX-required unsigned values
163 Second, DST is in effect all year if it starts
164 January 1 at 00:00 and ends December 31 at 24:00 plus the difference
165 between daylight saving and standard time.
167 Future changes to the format may append more data.
174 .\" This file is in the public domain, so clarified as of
175 .\" 1996-06-05 by Arthur David Olson.