OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man8 / zic.8
1 .\" This page is in the public domain
2 .\"
3 .TH ZIC 8 2010-02-25 "" "Linux System Administration"
4 .SH NAME
5 zic \- timezone compiler
6 .SH SYNOPSIS
7 .B zic
8 [
9 .B \-v
10 ] [
11 .B \-d
12 .I directory
13 ] [
14 .B \-l
15 .I localtime
16 ] [
17 .B \-p
18 .I posixrules
19 ] [
20 .B \-L
21 .I leapsecondfilename
22 ] [
23 .B \-s
24 ] [
25 .B \-y
26 .I command
27 ] [
28 .I filename
29 \&... ]
30 .SH DESCRIPTION
31 .if t .ds lq ``
32 .if t .ds rq ''
33 .if n .ds lq \&"\"
34 .if n .ds rq \&"\"
35 .de q
36 \\$3\*(lq\\$1\*(rq\\$2
37 ..
38 .I Zic
39 reads text from the file(s) named on the command line
40 and creates the time conversion information files specified in this input.
41 If a
42 .I filename
43 is
44 .BR \- ,
45 the standard input is read.
46 .PP
47 These options are available:
48 .TP
49 .BI "\-d " directory
50 Create time conversion information files in the named directory rather than
51 in the standard directory named below.
52 .TP
53 .BI "\-l " timezone
54 Use the given timezone as local time.
55 .I Zic
56 will act as if the input contained a link line of the form
57 .sp
58 .ti +.5i
59 Link    \fItimezone\fP          localtime
60 .TP
61 .BI "\-p " timezone
62 Use the given timezone's rules when handling POSIX-format
63 timezone environment variables.
64 .I Zic
65 will act as if the input contained a link line of the form
66 .sp
67 .ti +.5i
68 Link    \fItimezone\fP          posixrules
69 .TP
70 .BI "\-L " leapsecondfilename
71 Read leap second information from the file with the given name.
72 If this option is not used,
73 no leap second information appears in output files.
74 .TP
75 .B \-v
76 Complain if a year that appears in a data file is outside the range
77 of years representable by
78 .BR time (2)
79 values.
80 .TP
81 .B \-s
82 Limit time values stored in output files to values that are the same
83 whether they're taken to be signed or unsigned.
84 You can use this option to generate SVVS-compatible files.
85 .TP
86 .BI "\-y " command
87 Use the given
88 .I command
89 rather than
90 .B yearistype
91 when checking year types (see below).
92 .PP
93 Input lines are made up of fields.
94 Fields are separated from one another by any number of white space characters.
95 Leading and trailing white space on input lines is ignored.
96 An unquoted sharp character (#) in the input introduces a comment which extends
97 to the end of the line the sharp character appears on.
98 White space characters and sharp characters may be enclosed in double quotes
99 (") if they're to be used as part of a field.
100 Any line that is blank (after comment stripping) is ignored.
101 Nonblank lines are expected to be of one of three types:
102 rule lines, zone lines, and link lines.
103 .PP
104 A rule line has the form
105 .nf
106 .ti +.5i
107 .ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
108 .sp
109 Rule    NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
110 .sp
111 For example:
112 .ti +.5i
113 .sp
114 Rule    US      1967    1973    \-      Apr     lastSun 2:00    1:00    D
115 .sp
116 .fi
117 The fields that make up a rule line are:
118 .TP "\w'LETTER/S'u"
119 .B NAME
120 Gives the (arbitrary) name of the set of rules this rule is part of.
121 .TP
122 .B FROM
123 Gives the first year in which the rule applies.
124 Any integer year can be supplied; the Gregorian calendar is assumed.
125 The word
126 .I minimum
127 (or an abbreviation) means the minimum year representable as an integer.
128 The word
129 .I maximum
130 (or an abbreviation) means the maximum year representable as an integer.
131 Rules can describe times that are not representable as time values,
132 with the unrepresentable times ignored; this allows rules to be portable
133 among hosts with differing time value types.
134 .TP
135 .B TO
136 Gives the final year in which the rule applies.
137 In addition to
138 .I minimum
139 and
140 .I maximum
141 (as above),
142 the word
143 .I only
144 (or an abbreviation)
145 may be used to repeat the value of the
146 .B FROM
147 field.
148 .TP
149 .B TYPE
150 Gives the type of year in which the rule applies.
151 If
152 .B TYPE
153 is
154 .B \-
155 then the rule applies in all years between
156 .B FROM
157 and
158 .B TO
159 inclusive.
160 If
161 .B TYPE
162 is something else, then
163 .I zic
164 executes the command
165 .ti +.5i
166 \fByearistype\fP \fIyear\fP \fItype\fP
167 .br
168 to check the type of a year:
169 an exit status of zero is taken to mean that the year is of the given type;
170 an exit status of one is taken to mean that the year is not of the given type.
171 .TP
172 .B IN
173 Names the month in which the rule takes effect.
174 Month names may be abbreviated.
175 .TP
176 .B ON
177 Gives the day on which the rule takes effect.
178 Recognized forms include:
179 .nf
180 .in +.5i
181 .sp
182 .ta \w'Sun<=25\0\0'u
183 5       the fifth of the month
184 lastSun the last Sunday in the month
185 lastMon the last Monday in the month
186 Sun>=8  first Sunday on or after the eighth
187 Sun<=25 last Sunday on or before the 25th
188 .fi
189 .in -.5i
190 .sp
191 Names of days of the week may be abbreviated or spelled out in full.
192 Note that there must be no spaces within the
193 .B ON
194 field.
195 .TP
196 .B AT
197 Gives the time of day at which the rule takes effect.
198 Recognized forms include:
199 .nf
200 .in +.5i
201 .sp
202 .ta \w'1:28:13\0\0'u
203 2       time in hours
204 2:00    time in hours and minutes
205 15:00   24-hour format time (for times after noon)
206 1:28:14 time in hours, minutes, and seconds
207 \-      equivalent to 0
208 .fi
209 .in -.5i
210 .sp
211 where hour 0 is midnight at the start of the day,
212 and hour 24 is midnight at the end of the day.
213 Any of these forms may be followed by the letter
214 .I w
215 if the given time is local
216 .q "wall clock"
217 time,
218 .I s
219 if the given time is local
220 .q standard
221 time, or
222 .I u
223 (or
224 .I g
225 or
226 .IR z )
227 if the given time is universal time;
228 in the absence of an indicator,
229 wall clock time is assumed.
230 .TP
231 .B SAVE
232 Gives the amount of time to be added to local standard time when the rule is in
233 effect.
234 This field has the same format as the
235 .B AT
236 field
237 (although, of course, the
238 .I w
239 and
240 .I s
241 suffixes are not used).
242 .TP
243 .B LETTER/S
244 Gives the
245 .q "variable part"
246 (for example, the
247 .q S
248 or
249 .q D
250 in
251 .q EST
252 or
253 .q EDT )
254 of timezone abbreviations to be used when this rule is in effect.
255 If this field is
256 .BR \- ,
257 the variable part is null.
258 .PP
259 A zone line has the form
260 .sp
261 .nf
262 .ti +.5i
263 .ta \w'Zone\0\0'u +\w'Australia/Adelaide\0\0'u +\w'UTCOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u
264 Zone    NAME    UTCOFF  RULES/SAVE      FORMAT  [UNTIL]
265 .sp
266 For example:
267 .sp
268 .ti +.5i
269 Zone    Australia/Adelaide      9:30    Aus     CST     1971 Oct 31 2:00
270 .sp
271 .fi
272 The fields that make up a zone line are:
273 .TP "\w'UTCOFF'u"
274 .B NAME
275 The name of the timezone.
276 This is the name used in creating the time conversion information file for the
277 zone.
278 .TP
279 .B UTCOFF
280 The amount of time to add to UTC to get standard time in this zone.
281 This field has the same format as the
282 .B AT
283 and
284 .B SAVE
285 fields of rule lines;
286 begin the field with a minus sign if time must be subtracted from UTC.
287 .TP
288 .B RULES/SAVE
289 The name of the rule(s) that apply in the timezone or,
290 alternately, an amount of time to add to local standard time.
291 If this field is
292 .B \-
293 then standard time always applies in the timezone.
294 .TP
295 .B FORMAT
296 The format for timezone abbreviations in this timezone.
297 The pair of characters
298 .B %s
299 is used to show where the
300 .q "variable part"
301 of the timezone abbreviation goes.
302 Alternately,
303 a slash (/)
304 separates standard and daylight abbreviations.
305 .TP
306 .B UNTIL
307 The time at which the UTC offset or the rule(s) change for a location.
308 It is specified as a year, a month, a day, and a time of day.
309 If this is specified,
310 the timezone information is generated from the given UTC offset
311 and rule change until the time specified.
312 The month, day, and time of day have the same format as the IN, ON, and AT
313 columns of a rule; trailing columns can be omitted, and default to the
314 earliest possible value for the missing columns.
315 .IP
316 The next line must be a
317 .q continuation
318 line; this has the same form as a zone line except that the
319 string
320 .q Zone
321 and the name are omitted, as the continuation line will
322 place information starting at the time specified as the
323 .B UNTIL
324 field in the previous line in the file used by the previous line.
325 Continuation lines may contain an
326 .B UNTIL
327 field, just as zone lines do, indicating that the next line is a further
328 continuation.
329 .PP
330 A link line has the form
331 .sp
332 .nf
333 .ti +.5i
334 .ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u
335 Link    LINK-FROM       LINK-TO
336 .sp
337 For example:
338 .sp
339 .ti +.5i
340 Link    Europe/Istanbul Asia/Istanbul
341 .sp
342 .fi
343 The
344 .B LINK-FROM
345 field should appear as the
346 .B NAME
347 field in some zone line;
348 the
349 .B LINK-TO
350 field is used as an alternate name for that zone.
351 .PP
352 Except for continuation lines,
353 lines may appear in any order in the input.
354 .PP
355 Lines in the file that describes leap seconds have the following form:
356 .nf
357 .ti +.5i
358 .ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u
359 .sp
360 Leap    YEAR    MONTH   DAY     HH:MM:SS        CORR    R/S
361 .sp
362 For example:
363 .ti +.5i
364 .sp
365 Leap    1974    Dec     31      23:59:60        +       S
366 .sp
367 .fi
368 The
369 .BR YEAR ,
370 .BR MONTH ,
371 .BR DAY ,
372 and
373 .B HH:MM:SS
374 fields tell when the leap second happened.
375 The
376 .B CORR
377 field
378 should be
379 .q +
380 if a second was added
381 or
382 .q -
383 if a second was skipped.
384 .\" There's no need to document the following, since it's impossible for more
385 .\" than one leap second to be inserted or deleted at a time.
386 .\" The C Standard is in error in suggesting the possibility.
387 .\" See Terry J Quinn, The BIPM and the accurate measure of time,
388 .\" Proc IEEE 79, 7 (July 1991), 894-905.
389 .\"     or
390 .\"     .q ++
391 .\"     if two seconds were added
392 .\"     or
393 .\"     .q --
394 .\"     if two seconds were skipped.
395 The
396 .B R/S
397 field
398 should be (an abbreviation of)
399 .q Stationary
400 if the leap second time given by the other fields should be interpreted as UTC
401 or
402 (an abbreviation of)
403 .q Rolling
404 if the leap second time given by the other fields should be interpreted as
405 local wall clock time.
406 .SH FILES
407 /usr/local/etc/zoneinfo standard directory used for created files
408 .SH NOTES
409 For areas with more than two types of local time,
410 you may need to use local standard time in the
411 .B AT
412 field of the earliest transition time's rule to ensure that
413 the earliest transition time recorded in the compiled file is correct.
414 .SH "SEE ALSO"
415 .BR tzfile (5),
416 .BR zdump (8)
417 .\" @(#)zic.8   7.19