6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / zic.1m
blobf4d60990c20f96fd99c2ec942a359d3d6601739a
1 '\" te
2 .\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH ZIC 1M "Jan 3, 2006"
8 .SH NAME
9 zic \- time zone compiler
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBzic\fR [\fB--\fR\fIversion\fR] [\fB-s\fR] [\fB-v\fR] [\fB-l\fR \fIlocaltime\fR] [\fB-p\fR \fIposixrules\fR]
14      [\fB-d\fR \fIdirectory\fR] [\fB-y\fR \fIyearistype\fR] [\fIfilename\fR]...
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 \fBzic\fR reads text from the file(s) named on the command line and creates the
21 time conversion information files specified in this input. If a \fIfilename\fR
22 is '\fB\(mi\fR\&', the standard input is read.
23 .sp
24 .LP
25 Input lines are made up of fields. Fields are separated by any number of white
26 space characters. Leading and trailing white space on input lines is ignored. A
27 pound sign (\fB#\fR) indicates a comment that extends to the end of the line.
28 White space characters and pound signs can be enclosed within double quotes
29 (\fB" "\fR) if they are to be used as part of a field. Any line that is blank
30 (after comment stripping) is ignored. Non-blank lines are expected to be of one
31 of three types: rule lines, zone lines, or link lines.
32 .SS "Rule"
33 .sp
34 .LP
35 A rule line has the form:
36 .sp
37 .LP
38 For example:
39 .sp
40 .in +2
41 .nf
42 Rule   NAME  FROM  TO  TYPE  IN   ON     AT   SAVE  LETTER/S
43 .fi
44 .in -2
45 .sp
47 .sp
48 .LP
49 The fields that make up a rule line are:
50 .sp
51 .in +2
52 .nf
53 Rule   USA   1969  1973   -  Apr lastSun 2:00  1:00   D
54 .fi
55 .in -2
56 .sp
58 .sp
59 .ne 2
60 .na
61 \fB\fBNAME\fR\fR
62 .ad
63 .RS 12n
64 Gives the (arbitrary) name of the set of rules this rule is part of.
65 .RE
67 .sp
68 .ne 2
69 .na
70 \fB\fBFROM\fR\fR
71 .ad
72 .RS 12n
73 Gives the first year in which the rule applies. The word \fBminimum\fR (or an
74 abbreviation) means the minimum year with a representable time value. The word
75 \fBmaximum\fR (or an abbreviation) means the maximum year with a representable
76 time value.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fBTO\fR\fR
83 .ad
84 .RS 12n
85 Gives the final year in which the rule applies. In addition to \fBminimum\fR
86 and \fBmaximum\fR (as above), the word \fBonly\fR (or an abbreviation) can be
87 used to repeat the value of the \fBFROM\fR field.
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fBTYPE\fR\fR
94 .ad
95 .RS 12n
96 Gives the type of year in which the rule applies. If \fBTYPE\fR is:
97 .sp
98 .ne 2
99 .na
100 \fB\&'\fB\(mi\fR\&'\fR
102 .RS 14n
103 The rule applies in all years between \fBFROM\fR and \fBTO\fR, inclusive.
107 .ne 2
109 \fB\fBuspres\fR\fR
111 .RS 14n
112 The rule applies in U.S. Presidential election years.
116 .ne 2
118 \fB\fBnonpres\fR\fR
120 .RS 14n
121 The rule applies in years other than U.S. Presidential election years.
125 .ne 2
127 \fB\fBeven\fR\fR
129 .RS 14n
130 The rule applies to even-numbered years.
134 .ne 2
136 \fB\fBodd\fR\fR
138 .RS 14n
139 The rule applies to odd-numbered years.
142 If \fBTYPE\fR is something else, then \fBzic\fR will attempt to execute the
143 command
145 .in +2
147 \fByearistype\fR \fIyear\fR \fBtype\fR
149 .in -2
152 to check the type of a year: an exit status of \fB0\fR means that the year is
153 of the given type; an exit status of \fB1\fR means that the year is not of the
154 given type. The \fByearistype\fR command is not currently provided in the
155 Solaris environment.
159 .ne 2
161 \fB\fBIN\fR\fR
163 .RS 12n
164 Names the month in which the rule takes effect. Month names can be abbreviated.
168 .ne 2
170 \fB\fBON\fR\fR
172 .RS 12n
173 Gives the day on which the rule takes effect. Recognized forms include:
175 .ne 2
177 \fB\fB5\fR\fR
179 .RS 11n
180 the fifth day of the month
184 .ne 2
186 \fB\fBlastSun\fR\fR
188 .RS 11n
189 The last Sunday in the month
193 .ne 2
195 \fB\fBlastMon\fR\fR
197 .RS 11n
198 The last Monday in the month
202 .ne 2
204 \fB\fBSun>=8\fR\fR
206 .RS 11n
207 First Sunday on or after the eighth
211 .ne 2
213 \fB\fBSun<=25\fR\fR
215 .RS 11n
216 Last Sunday on or before the 25th
219 Names of days of the week can be abbreviated or spelled out in full. Note:
220 There cannot be spaces within the \fBON\fR field.
224 .ne 2
226 \fB\fBAT\fR\fR
228 .RS 12n
229 Gives the time of day at which the rule takes effect. Recognized forms include:
231 .ne 2
233 \fB\fB2\fR\fR
235 .RS 11n
236 Time in hours
240 .ne 2
242 \fB\fB2:00\fR\fR
244 .RS 11n
245 Time in hours and minutes
249 .ne 2
251 \fB\fB15:00\fR\fR
253 .RS 11n
254 24-hour format time (for times after noon)
258 .ne 2
260 \fB\fB1:28:14\fR\fR
262 .RS 11n
263 Time in hours, minutes, and seconds, where hour 0 is midnight at the start of
264 the day and hour 24 is midnight at the end of the day.
267 Any of these forms can be followed by the letter \fBw\fR if the given time is
268 local "wall clock" time; \fBs\fR if the given time is local "standard" time; or
269 \fBu\fR (or \fBg\fR or \fBz\fR) if the given time is universal time. In the
270 absence of an indicator, wall clock time is assumed.
274 .ne 2
276 \fB\fBSAVE\fR\fR
278 .RS 12n
279 Gives the amount of time to be added to local standard time when the rule is in
280 effect. This field has the same format as the \fBAT\fR field (without the
281 \fBw\fR and \fBs\fR suffixes).
285 .ne 2
287 \fB\fBLETTER/S\fR\fR
289 .RS 12n
290 Gives the "variable part" (for example, the "S" or "D" in "EST" or "EDT" of
291 time zone abbreviations to be used when this rule is in effect. If this field
292 is '\fB\(mi\fR\&', the variable part is null.
295 .SS "Zone"
298 A zone line has the form:
300 .in +2
302 Zone  NAME                 GMTOFF  RULES/SAVE   FORMAT  [UNTIL]
304 .in -2
309 For example:
311 .in +2
313 Zone Australia/SouthWest   9:30        -         CST    1992 Mar 15 12:00
314                            8:30      Aus         CST
316 .in -2
321 The fields that make up a zone line are:
323 .ne 2
325 \fB\fBNAME\fR\fR
327 .RS 14n
328 The name of the time zone. This is the name used in creating the time
329 conversion information file for the zone.
333 .ne 2
335 \fB\fBGMTOFF\fR\fR
337 .RS 14n
338 The amount of time to add to \fBUTC\fR to get standard time in this zone. This
339 field has the same format as the \fBAT\fR and \fBSAVE\fR fields of rule lines;
340 begin the field with a minus sign to subtract time from \fBUTC\fR.
344 .ne 2
346 \fB\fBRULES/SAVE\fR\fR
348 .RS 14n
349 The name of the rule(s) that apply in the time zone or, alternately, an amount
350 of time to add to local standard time. If this field is `\fB\(mi\fR\&', then
351 standard time always applies in the time zone.
355 .ne 2
357 \fB\fBFORMAT\fR\fR
359 .RS 14n
360 The format for time zone abbreviations in this time zone. The pair of
361 characters \fB%s\fR is used to show where the "variable part" of the time zone
362 abbreviation goes. Alternately, a slash (/) separates standard and daylight
363 abbreviations.
367 .ne 2
369 \fB\fBUNTIL\fR\fR
371 .RS 14n
372 The time at which the \fBUTC\fR offset or the rule(s) change for a location. It
373 is specified as a year, a month, a day, and a time of day. The time of day has
374 the same format as the \fBAT\fR field of rule lines. If this is specified, the
375 time zone information is generated from the given \fBUTC\fR offset and rule
376 change until the time specified.
378 The month, day, and time of day have the same format as the IN, ON, and AT
379 columns of a rule; trailing columns can be omitted, and default to the earliest
380 possible value for the missing columns.
382 The next line must be a "continuation" line. This line has the same form as a
383 zone line except that the string "Zone" and the name are omitted. The
384 continuation line places information starting at the time specified as the
385 \fBUNTIL\fR field in the previous line in the file used by the previous line.
386 Continuation lines can contain an \fBUNTIL\fR field, just as zone lines do,
387 indicating that the next line is a further continuation.
390 .SS "Link"
393 A link line has the form:
395 .in +2
397 Link   LINK-FROM   LINK-TO
399 .in -2
404 For example:
406 .in +2
408 Link   Europe/Istanbul Asia/Istanbul
410 .in -2
415 The \fBLINK-FROM\fR field should appear as the \fBNAME\fR field in some zone
416 line; the \fBLINK-TO\fR field is used as an alternate name for that zone.
419 Except for continuation lines, lines can appear in any order in the input.
420 .SH OPTIONS
422 .ne 2
424 \fB\fB--\fR\fIversion\fR\fR
426 .RS 17n
427 Outputs version information and exits.
431 .ne 2
433 \fB\fB-d\fR \fIdirectory\fR\fR
435 .RS 17n
436 Creates time conversion information files in the directory \fIdirectory\fR
437 rather than in the standard directory \fB/usr/share/lib/zoneinfo\fR.
441 .ne 2
443 \fB\fB-l\fR \fIlocaltime\fR\fR
445 .RS 17n
446 Uses the given time zone as local time \fIlocaltime\fR. \fBzic\fR acts as if
447 the file contained a link line of the form:
449 .in +2
451 Link \fIlocaltime\fR localtime
453 .in -2
459 .ne 2
461 \fB\fB-p\fR \fIposixrules\fR\fR
463 .RS 17n
464 Uses the rules of the given time zone \fIposixrules\fR when handling
465 POSIX-format time zone environment variables. \fBzic\fR acts as if the input
466 contained a link line of the form:
468 .in +2
470 Link    \fIposixrules\fR posixrules
472 .in -2
475 This option is not used by \fBctime\fR(3C) and \fBmktime\fR(3C) in the Solaris
476 environment.
480 .ne 2
482 \fB\fB-s\fR\fR
484 .RS 17n
485 Limits time values stored in output files to values that are the same whether
486 they are taken to be signed or unsigned. You can use this option to generate
487 SVVS-compatible files.
489 This option is obsolete and may be removed in a future release.
493 .ne 2
495 \fB\fB-v\fR\fR
497 .RS 17n
498 Complains if a year that appears in a data file is outside the range of years
499 representable by system time values (\fB0:00:00 a.m.\fR \fBUTC,\fR \fBJanuary
500 1\fR, \fB1970\fR, to \fB3:14:07 a.m.\fR \fBUTC,\fR \fBJanuary 19\fR,
501 \fB2038\fR). This option also complains if a time of 24:00  (which  cannot be
502 handled by pre-1998  versions  of \fBzic\fR)  appears in  the input.
506 .ne 2
508 \fB\fB-y\fR \fIyearistype\fR\fR
510 .RS 17n
511 Uses the given command \fIyearistype\fR rather than \fByearistype\fR when
512 checking year types (see \fBRules\fR under \fBDESCRIPTION\fR).
515 .SH OPERANDS
517 .ne 2
519 \fB\fIfilename\fR\fR
521 .RS 12n
522 A file containing input lines that specify the time conversion information
523 files to be created. If a \fIfilename\fR is '\fB\(mi\fR\&', the standard input
524 is read.
527 .SH FILES
529 .ne 2
531 \fB\fB/usr/share/lib/zoneinfo\fR\fR
533 .sp .6
534 .RS 4n
535 Standard directory used for created files
539 .ne 2
541 \fB\fB/usr/share/lib/zoneinfo/src\fR\fR
543 .sp .6
544 .RS 4n
545 Directory containing source files
548 .SH ATTRIBUTES
551 See \fBattributes\fR(5) for descriptions of the following attributes:
556 box;
557 c | c
558 l | l .
559 ATTRIBUTE TYPE  ATTRIBUTE VALUE
561 Interface Stability     Committed*
566 * The \fB-s\fR option is obsolete.
567 .SH SEE ALSO
570 \fBtime\fR(1), \fBzdump\fR(1M), \fBctime\fR(3C), \fBmktime\fR(3C),
571 \fBattributes\fR(5)
572 .SH NOTES
575 For areas with more than two types of local time, you might need to use local
576 standard time in the \fBAT\fR field of the earliest transition time's rule to
577 ensure that the earliest transition time recorded in the compiled file is
578 correct.
581 If the current \fItimezone\fR file is edited and compiled using the "\fBzic\fR"
582 command, the changes will only be reflected in any new processes that are
583 running.  The most accurate way to reflect the changes for the whole system
584 would be a reboot.