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"
9 zic \- time zone compiler
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]...
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.
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.
35 A rule line has the form:
42 Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
49 The fields that make up a rule line are:
53 Rule USA 1969 1973 - Apr lastSun 2:00 1:00 D
64 Gives the (arbitrary) name of the set of rules this rule is part of.
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
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.
96 Gives the type of year in which the rule applies. If \fBTYPE\fR is:
100 \fB\&'\fB\(mi\fR\&'\fR
103 The rule applies in all years between \fBFROM\fR and \fBTO\fR, inclusive.
112 The rule applies in U.S. Presidential election years.
121 The rule applies in years other than U.S. Presidential election years.
130 The rule applies to even-numbered years.
139 The rule applies to odd-numbered years.
142 If \fBTYPE\fR is something else, then \fBzic\fR will attempt to execute the
147 \fByearistype\fR \fIyear\fR \fBtype\fR
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
164 Names the month in which the rule takes effect. Month names can be abbreviated.
173 Gives the day on which the rule takes effect. Recognized forms include:
180 the fifth day of the month
189 The last Sunday in the month
198 The last Monday in the month
207 First Sunday on or after the eighth
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.
229 Gives the time of day at which the rule takes effect. Recognized forms include:
245 Time in hours and minutes
254 24-hour format time (for times after noon)
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.
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).
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.
298 A zone line has the form:
302 Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
313 Zone Australia/SouthWest 9:30 - CST 1992 Mar 15 12:00
321 The fields that make up a zone line are:
328 The name of the time zone. This is the name used in creating the time
329 conversion information file for the zone.
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.
346 \fB\fBRULES/SAVE\fR\fR
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.
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
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.
393 A link line has the form:
397 Link LINK-FROM LINK-TO
408 Link Europe/Istanbul Asia/Istanbul
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.
424 \fB\fB--\fR\fIversion\fR\fR
427 Outputs version information and exits.
433 \fB\fB-d\fR \fIdirectory\fR\fR
436 Creates time conversion information files in the directory \fIdirectory\fR
437 rather than in the standard directory \fB/usr/share/lib/zoneinfo\fR.
443 \fB\fB-l\fR \fIlocaltime\fR\fR
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:
451 Link \fIlocaltime\fR localtime
461 \fB\fB-p\fR \fIposixrules\fR\fR
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:
470 Link \fIposixrules\fR posixrules
475 This option is not used by \fBctime\fR(3C) and \fBmktime\fR(3C) in the Solaris
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.
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.
508 \fB\fB-y\fR \fIyearistype\fR\fR
511 Uses the given command \fIyearistype\fR rather than \fByearistype\fR when
512 checking year types (see \fBRules\fR under \fBDESCRIPTION\fR).
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
531 \fB\fB/usr/share/lib/zoneinfo\fR\fR
535 Standard directory used for created files
541 \fB\fB/usr/share/lib/zoneinfo/src\fR\fR
545 Directory containing source files
551 See \fBattributes\fR(5) for descriptions of the following attributes:
559 ATTRIBUTE TYPE ATTRIBUTE VALUE
561 Interface Stability Committed*
566 * The \fB-s\fR option is obsolete.
570 \fBtime\fR(1), \fBzdump\fR(1M), \fBctime\fR(3C), \fBmktime\fR(3C),
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
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