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