OSDN Git Service

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