|
|
1.1 root 1: .\" @(#)tzfile.5 1.2 (Berkeley) 3/11/87
2: .\"
3: .TH TZFILE 5
4: .AT 5
5: .SH NAME
6: tzfile \- time zone information
7: .SH SYNOPSIS
8: .B
9: #include <tzfile.h>
10: .SH DESCRIPTION
11: The time zone information files used by
12: .IR tzset (3)
13: begin with bytes reserved for future use,
14: followed by three four-byte values of type
15: .BR long ,
16: written in a ``standard'' byte order
17: (the high-order byte of the value is written first).
18: These values are,
19: in order:
20: .TP
21: .I tzh_timecnt
22: The number of "transition times" for which data is stored
23: in the file.
24: .TP
25: .I tzh_typecnt
26: The number of "local time types" for which data is stored
27: in the file (must not be zero).
28: .TP
29: .I tzh_charcnt
30: The number of characters of "time zone abbreviation strings"
31: stored in the file.
32: .PP
33: The above header is followed by
34: .I tzh_timecnt
35: four-byte values of type
36: .BR long ,
37: sorted in ascending order.
38: These values are written in ``standard'' byte order.
39: Each is used as a transition time (as returned by
40: .IR time (2))
41: at which the rules for computing local time change.
42: Next come
43: .I tzh_timecnt
44: one-byte values of type
45: .BR "unsigned char" ;
46: each one tells which of the different types of ``local time'' types
47: described in the file is associated with the same-indexed transition time.
48: These values serve as indices into an array of
49: .I ttinfo
50: structures that appears next in the file;
51: these structures are defined as follows:
52: .in +.5i
53: .sp
54: .nf
55: .ta .5i +\w'unsigned int\0\0'u
56: struct ttinfo {
57: long tt_gmtoff;
58: int tt_isdst;
59: unsigned int tt_abbrind;
60: };
61: .in -.5i
62: .fi
63: .sp
64: Each structure is written as a four-byte value for
65: .I tt_gmtoff
66: of type
67: .BR long ,
68: in a standard byte order, followed by a one-byte value for
69: .I tt_isdst
70: and a one-byte value for
71: .IR tt_abbrind .
72: In each structure,
73: .I tt_gmtoff
74: gives the number of seconds to be added to GMT,
75: .I tt_isdst
76: tells whether
77: .I tm_isdst
78: should be set by
79: .I localtime (3)
80: and
81: .I tt_abbrind
82: serves as an index into the array of time zone abbreviation characters
83: that follow the
84: .I ttinfo
85: structure(s) in the file.
86: .PP
87: .I Localtime
88: uses the first standard-time
89: .I ttinfo
90: structure in the file
91: (or simply the first
92: .I ttinfo
93: structure in the absence of a standard-time structure)
94: if either
95: .I tzh_timecnt
96: is zero or the time argument is less than the first transition time recorded
97: in the file.
98: .SH SEE ALSO
99: ctime(3)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.