OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man5 / tzfile.5
1 .\" @(#)tzfile.5        7.11
2 .\" This file is in the public domain, so clarified as of
3 .\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
4 .\"
5 .\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
6 .\" Translated Tue Sep 14 1999 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
7 .\" 
8 .\"WORD:        transition time         遷移時間
9 .\"WORD:        local time types        ローカル時間型
10 .\"WORD:        timezone abbreviatio strint     タイムゾーン略式文字列
11 .\"
12 .TH TZFILE 5 1996-06-05 "" "Linux Programmer's Manual"
13 .\"O .SH NAME
14 .\"O tzfile \- timezone information
15 .\"O .SH SYNOPSIS
16 .SH 名前
17 tzfile \- タイムゾーンの情報
18 .SH 書式
19 .B #include <tzfile.h>
20 .\"O .SH DESCRIPTION
21 .SH 説明
22 .\"O The timezone information files used by
23 .\"O .BR tzset (3)
24 .\"O begin with the magic characters "TZif" to identify then as
25 .\"O timezone information files,
26 .\"O followed by sixteen bytes reserved for future use,
27 .\"O followed by six four-byte values of type
28 .\"O .IR long ,
29 .\"O written in a "standard" byte order
30 .\"O (the high-order byte of the value is written first).
31 .\"O These values are,
32 .\"O in order:
33 .BR tzset (3)
34 によって用いられるタイムゾーン情報のファイルは、
35 識別のための magic 文字列 "TZif" で始まり、
36 将来のための 16 バイトの予約領域が続き、
37 .I long
38 型の 4 バイトの値が 6 個続く。
39 この値は「標準」バイトオーダー (高位バイトが先に書かれる)
40 で記述される。これらの値は、順に以下のようなものである。
41 .TP
42 .I tzh_ttisgmtcnt
43 .\"O The number of UTC/local indicators stored in the file.
44 ファイルに記述されている UTC/local インジケータ (indicator) の個数。
45 .TP
46 .I tzh_ttisstdcnt
47 .\"O The number of standard/wall indicators stored in the file.
48 ファイルに記述されている standard/wall インジケータの個数。
49 .TP
50 .I tzh_leapcnt
51 .\"O The number of leap seconds for which data is stored in the file.
52 ファイルに記述されている閏秒データの個数。
53 .TP
54 .I tzh_timecnt
55 .\"O The number of "transition times" for which data is stored
56 .\"O in the file.
57 ファイルに記述されている「遷移時間 (transition time)」データの個数。
58 .TP
59 .I tzh_typecnt
60 .\"O The number of "local time types" for which data is stored
61 .\"O in the file (must not be zero).
62 ファイルに記述されている「ローカル時間型 (local time types)」データの個数
63 (0 であってはいけない)。
64 .TP
65 .I tzh_charcnt
66 .\"O The number of characters of "timezone abbreviation strings"
67 .\"O stored in the file.
68 ファイルに記述されている「タイムゾーン略式文字列 (timezone
69 abbreviation string)」の個数。
70 .PP
71 .\"O The above header is followed by
72 .\"O .I tzh_timecnt
73 .\"O four-byte values of type
74 .\"O .IR long ,
75 .\"O sorted in ascending order.
76 .\"O These values are written in "standard" byte order.
77 .\"O Each is used as a transition time (as returned by
78 .\"O .BR time (2))
79 .\"O at which the rules for computing local time change.
80 上記のヘッダに続いて
81 .I tzh_timecnt
82 という 4 バイトの
83 .I long
84 型の値が (複数個) 続く。昇順で保管されている。
85 これらの値は「標準」バイトオーダーで記述されている。
86 それぞれは遷移時間
87 .RB ( time (2)
88 が返す値) として用いられ、
89 それぞれにおいてローカル時間の計算ルールが変更される。
90 .\"O Next come
91 .\"O .I tzh_timecnt
92 .\"O one-byte values of type
93 .\"O .IR "unsigned char" ;
94 .\"O each one tells which of the different types of "local time" types
95 .\"O described in the file is associated with the same-indexed transition time.
96 .\"O These values serve as indices into an array of
97 .\"O .I ttinfo
98 .\"O structures that appears next in the file;
99 次に来るのは
100 .I tzh_timecnt
101 で、これは
102 .I "unsigned char"
103 型の 1 バイトの値である (複数個続くこともある)。
104 この値は、ファイルで記述されている異なったタイプの「ローカル時間」が、
105 それぞれ同じようにインデックスされた遷移時間のどれに関連づけられて
106 いるかを示す。
107 これらの値は
108 .I ttinifo
109 構造体の配列に対するインデックスとして提供されている。
110 .I ttinfo
111 構造体はファイル中で次の位置に置かれる。
112 .\"O these structures are defined as follows:
113 この構造体は以下のように定義されている:
114 .in +4n
115 .sp
116 .nf
117 struct ttinfo {
118     long         tt_gmtoff;
119     int          tt_isdst;
120     unsigned int tt_abbrind;
121 };
122 .in
123 .fi
124 .sp
125 .\"O Each structure is written as a four-byte value for
126 .\"O .I tt_gmtoff
127 .\"O of type
128 .\"O .B long ,
129 .\"O in a standard byte order, followed by a one-byte value for
130 .\"O .I tt_isdst
131 .\"O and a one-byte value for
132 .\"O .IR tt_abbrind .
133 それぞれの構造体は、 4 バイトの \fIlong\fP 型の値 \fItt_gmtoff\fP、
134 1 バイトの値 \fItt_isdst\fP,
135 1 バイトの値 \fItt_abbrind\fP から構成される。
136 .\"NAKANO int なのに 4 バイトなの? 
137 .\"O In each structure,
138 .\"O .I tt_gmtoff
139 .\"O gives the number of seconds to be added to UTC,
140 .\"O .I tt_isdst
141 .\"O tells whether
142 .\"O .I tm_isdst
143 .\"O should be set by
144 .\"O .BR localtime (3),
145 .\"O and
146 .\"O .I tt_abbrind
147 .\"O serves as an index into the array of timezone abbreviation characters
148 .\"O that follow the
149 .\"O .I ttinfo
150 .\"O structure(s) in the file.
151 それぞれの構造体において、
152 .I tt_gmtoff
153 は UTC に加えるべき秒数を与え、
154 .I tt_isdst
155
156 .I tm_isdst
157
158 .BR localtime (3)
159 にセットすべきかどうかを示し、
160 .I tt_abbrind
161 はファイル中で \fIttinfo\fP 構造体 (配列) のあとに置かれる
162 タイムゾーン略式文字列の配列に対するインデックスである。
163 .PP
164 .\"O Then there are
165 .\"O .I tzh_leapcnt
166 .\"O pairs of four-byte values, written in standard byte order;
167 .\"O the first value of each pair gives the time
168 .\"O (as returned by
169 .\"O .IR time(2))
170 .\"O at which a leap second occurs;
171 .\"O the second gives the
172 .\"O .I total
173 .\"O number of leap seconds to be applied after the given time.
174 .\"O The pairs of values are sorted in ascending order by time.
175 次には 4 バイト値のペアである
176 .I tzh_leapcnt
177 が (複数個) 続く。標準バイトオーダーで記述される。
178 それぞれのペアの最初の値は閏秒の起きた時刻を (
179 .IR time (2)
180 の返す形式で) 与え、二番目の値はその時刻に加えるべき閏秒数の
181 全秒数を与える。これらのペアは時刻の古い順に記述する。
182 .PP
183 .\"O Then there are
184 .\"O .I tzh_ttisstdcnt
185 .\"O standard/wall indicators, each stored as a one-byte value;
186 .\"O they tell whether the transition times associated with local time types
187 .\"O were specified as standard time or wall clock time,
188 .\"O and are used when a timezone file is used in handling POSIX-style
189 .\"O timezone environment variables.
190 次には
191 .I tzh_ttisstdcnt
192 が置かれる。これは standard/wall インジケータで、それぞれ 1 バイトの
193 値を保管する。これらはローカル時間のタイプに関連づけられた遷移時間が
194 標準時刻 (standard time) と壁時計時刻 (wall clock time) の
195 どちらで指定されているかを示す。またこの値は、
196 POSIX スタイルのタイムゾーン環境変数を処理するときに
197 タイムゾーンファイルが使われるときにも利用される。
198 .PP
199 .\"O Finally, there are
200 .\"O .I tzh_ttisgmtcnt
201 .\"O UTC/local indicators, each stored as a one-byte value;
202 .\"O they tell whether the transition times associated with local time types
203 .\"O were specified as UTC or local time,
204 .\"O and are used when a timezone file is used in handling POSIX-style
205 .\"O timezone environment variables.
206 最後に
207 .I tzh_ttisgmtcnt
208 が置かれる。これは UTC/local インジケータで、それぞれ 1 バイトの
209 値を保管する。これらはローカル時間のタイプに関連づけられた遷移時間が
210 UTC とローカル時刻のどちらで指定されているかを示す。またこの値は、
211 POSIX スタイルのタイムゾーン環境変数を処理するときに
212 タイムゾーンファイルが使われるときにも利用される。
213 .PP
214 .\"O .I Localtime
215 .\"O uses the first standard-time
216 .\"O .I ttinfo
217 .\"O structure in the file
218 .\"O (or simply the first
219 .\"O .I ttinfo
220 .\"O structure in the absence of a standard-time structure)
221 .\"O if either
222 .\"O .I tzh_timecnt
223 .\"O is zero or the time argument is less than the first transition time recorded
224 .\"O in the file.
225 .I localtime
226 は、
227 .I tzh_timeout
228 が 0 であるか time 引数がファイルに記録されていた最初の遷移時刻
229 よりも小さい場合には、
230 ファイルに最初に現れる標準時刻の
231 .I ttinfo
232 構造体を使う (または標準時刻の構造体がない場合は、単に最初の
233 .I ttinfo
234 構造体を使う)。