version 1, including all changes.
.
| Rev |
Author |
# |
Line |
| 1 |
perry |
1 |
TZFILE |
| |
|
2 |
!!!TZFILE |
| |
|
3 |
NAME |
| |
|
4 |
SYNOPSIS |
| |
|
5 |
DESCRIPTION |
| |
|
6 |
SEE ALSO |
| |
|
7 |
---- |
| |
|
8 |
!!NAME |
| |
|
9 |
|
| |
|
10 |
|
| |
|
11 |
tzfile - time zone information |
| |
|
12 |
!!SYNOPSIS |
| |
|
13 |
|
| |
|
14 |
|
| |
|
15 |
__#include __ |
| |
|
16 |
!!DESCRIPTION |
| |
|
17 |
|
| |
|
18 |
|
| |
|
19 |
The time zone information files used by tzset(3) |
| |
|
20 |
begin with the magic characters |
| |
|
21 |
''long__, written in a ``standard'' byte |
| |
|
22 |
order (the high-order byte of the value is written first). |
| |
|
23 |
These values are, in order: |
| |
|
24 |
|
| |
|
25 |
|
| |
|
26 |
''tzh_ttisgmtcnt'' |
| |
|
27 |
|
| |
|
28 |
|
| |
|
29 |
The number of UTC/local indicators stored in the |
| |
|
30 |
file. |
| |
|
31 |
|
| |
|
32 |
|
| |
|
33 |
''tzh_ttisstdcnt'' |
| |
|
34 |
|
| |
|
35 |
|
| |
|
36 |
The number of standard/wall indicators stored in the |
| |
|
37 |
file. |
| |
|
38 |
|
| |
|
39 |
|
| |
|
40 |
''tzh_leapcnt'' |
| |
|
41 |
|
| |
|
42 |
|
| |
|
43 |
The number of leap seconds for which data is stored in the |
| |
|
44 |
file. |
| |
|
45 |
|
| |
|
46 |
|
| |
|
47 |
''tzh_timecnt'' |
| |
|
48 |
|
| |
|
49 |
|
| |
|
50 |
The number of |
| |
|
51 |
|
| |
|
52 |
|
| |
|
53 |
''tzh_typecnt'' |
| |
|
54 |
|
| |
|
55 |
|
| |
|
56 |
The number of |
| |
|
57 |
|
| |
|
58 |
|
| |
|
59 |
''tzh_charcnt'' |
| |
|
60 |
|
| |
|
61 |
|
| |
|
62 |
The number of characters of |
| |
|
63 |
|
| |
|
64 |
|
| |
|
65 |
The above header is followed by ''tzh_timecnt'' four-byte |
| |
|
66 |
values of type __long__, sorted in ascending order. These |
| |
|
67 |
values are written in ``standard'' byte order. Each is used |
| |
|
68 |
as a transition time (as returned by time(2)) at |
| |
|
69 |
which the rules for computing local time change. Next come |
| |
|
70 |
''tzh_timecnt'' one-byte values of type __unsigned |
| |
|
71 |
char__; each one tells which of the different types of |
| |
|
72 |
``local time'' types described in the file is associated |
| |
|
73 |
with the same-indexed transition time. These values serve as |
| |
|
74 |
indices into an array of ''ttinfo'' structures that |
| |
|
75 |
appears next in the file; these structures are defined as |
| |
|
76 |
follows: |
| |
|
77 |
|
| |
|
78 |
|
| |
|
79 |
struct ttinfo { |
| |
|
80 |
long tt_gmtoff; |
| |
|
81 |
int tt_isdst; |
| |
|
82 |
unsigned int tt_abbrind; |
| |
|
83 |
}; |
| |
|
84 |
Each structure is written as a four-byte value for ''tt_gmtoff'' of type __long__, in a standard byte order, followed by a one-byte value for ''tt_isdst'' and a one-byte value for ''tt_abbrind''. In each structure, ''tt_gmtoff'' gives the number of seconds to be added to UTC, ''tt_isdst'' tells whether ''tm_isdst'' should be set by ''localtime (3)'' and ''tt_abbrind'' serves as an index into the array of time zone abbreviation characters that follow the ''ttinfo'' structure(s) in the file. |
| |
|
85 |
|
| |
|
86 |
|
| |
|
87 |
Then there are ''tzh_leapcnt'' pairs of four-byte values, |
| |
|
88 |
written in standard byte order; the first value of each pair |
| |
|
89 |
gives the time (as returned by ''time(2))'' at which a |
| |
|
90 |
leap second occurs; the second gives the ''total'' number |
| |
|
91 |
of leap seconds to be applied after the given time. The |
| |
|
92 |
pairs of values are sorted in ascending order by |
| |
|
93 |
time. |
| |
|
94 |
|
| |
|
95 |
|
| |
|
96 |
Then there are ''tzh_ttisstdcnt'' standard/wall |
| |
|
97 |
indicators, each stored as a one-byte value; they tell |
| |
|
98 |
whether the transition times associated with local time |
| |
|
99 |
types were specified as standard time or wall clock time, |
| |
|
100 |
and are used when a time zone file is used in handling |
| |
|
101 |
POSIX-style time zone environment variables. |
| |
|
102 |
|
| |
|
103 |
|
| |
|
104 |
Finally there are ''tzh_ttisgmtcnt'' UTC/local |
| |
|
105 |
indicators, each stored as a one-byte value; they tell |
| |
|
106 |
whether the transition times associated with local time |
| |
|
107 |
types were specified as UTC or local time, and are used when |
| |
|
108 |
a time zone file is used in handling POSIX-style time zone |
| |
|
109 |
environment variables. |
| |
|
110 |
|
| |
|
111 |
|
| |
|
112 |
''Localtime'' uses the first standard-time ''ttinfo'' |
| |
|
113 |
structure in the file (or simply the first ''ttinfo'' |
| |
|
114 |
structure in the absence of a standard-time structure) if |
| |
|
115 |
either ''tzh_timecnt'' is zero or the time argument is |
| |
|
116 |
less than the first transition time recorded in the |
| |
|
117 |
file. |
| |
|
118 |
!!SEE ALSO |
| |
|
119 |
|
| |
|
120 |
|
| |
|
121 |
newctime(3) |
| |
|
122 |
---- |