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