3 tzfile - time zone information
9 The time zone information files used by tzset(3) begin with
10 the magic characters "TZif" to identify then as time zone
11 information files, followed by sixteen bytes reserved for
12 future use, followed by six four-byte values of type long,
13 written in a ``standard'' byte order (the high-order byte of
14 the value is written first). These values are, in order:
17 The number of UTC/local indicators stored in the file.
20 The number of standard/wall indicators stored in the
24 The number of leap seconds for which data is stored in
28 The number of "transition times" for which data is
32 The number of "local time types" for which data is
33 stored in the file (must not be zero).
36 The number of characters of "time zone abbreviation
37 strings" stored in the file.
39 The above header is followed by tzh_timecnt four-byte values
40 of type long, sorted in ascending order. These values are
41 written in ``standard'' byte order. Each is used as a
42 transition time (as returned by time(2)) at which the rules
43 for computing local time change. Next come tzh_timecnt
44 one-byte values of type unsigned char; each one tells which
45 of the different types of ``local time'' types described in
46 the file is associated with the same-indexed transition
47 time. These values serve as indices into an array of ttinfo
48 structures that appears next in the file; these structures
49 are defined as follows:
54 unsigned int tt_abbrind;
57 Each structure is written as a four-byte value for tt_gmtoff
58 of type long, in a standard byte order, followed by a one-
59 byte value for tt_isdst and a one-byte value for tt_abbrind.
60 In each structure, tt_gmtoff gives the number of seconds to
61 be added to UTC, tt_isdst tells whether tm_isdst should be
62 set by localtime (3) and tt_abbrind serves as an index into
63 the array of time zone abbreviation characters that follow
64 the ttinfo structure(s) in the file.
66 Then there are tzh_leapcnt pairs of four-byte values,
67 written in standard byte order; the first value of each pair
68 gives the time (as returned by time(2)) at which a leap
69 second occurs; the second gives the total number of leap
70 seconds to be applied after the given time. The pairs of
71 values are sorted in ascending order by time.
73 Then there are tzh_ttisstdcnt standard/wall indicators, each
74 stored as a one-byte value; they tell whether the transition
75 times associated with local time types were specified as
76 standard time or wall clock time, and are used when a time
77 zone file is used in handling POSIX-style time zone
78 environment variables.
80 Finally there are tzh_ttisgmtcnt UTC/local indicators, each
81 stored as a one-byte value; they tell whether the transition
82 times associated with local time types were specified as UTC
83 or local time, and are used when a time zone file is used in
84 handling POSIX-style time zone environment variables.
86 Localtime uses the first standard-time ttinfo structure in
87 the file (or simply the first ttinfo structure in the
88 absence of a standard-time structure) if either tzh_timecnt
89 is zero or the time argument is less than the first
90 transition time recorded in the file.