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