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