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