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