'\" te .\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 1989 AT&T .\" 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. .\" 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. .\" 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] .TH zic 1M "3 Jan 2006" "SunOS 5.11" "System Administration Commands" .SH NAME zic \- time zone compiler .SH SYNOPSIS .LP .nf \fBzic\fR [\fB--\fR\fIversion\fR] [\fB-s\fR] [\fB-v\fR] [\fB-l\fR \fIlocaltime\fR] [\fB-p\fR \fIposixrules\fR] [\fB-d\fR \fIdirectory\fR] [\fB-y\fR \fIyearistype\fR] [\fIfilename\fR]... .fi .SH DESCRIPTION .sp .LP \fBzic\fR reads text from the file(s) named on the command line and creates the time conversion information files specified in this input. If a \fIfilename\fR is '\fB\(mi\fR\&', the standard input is read. .sp .LP Input lines are made up of fields. Fields are separated by any number of white space characters. Leading and trailing white space on input lines is ignored. A pound sign (\fB#\fR) indicates a comment that extends to the end of the line. White space characters and pound signs can be enclosed within double quotes (\fB" "\fR) if they are to be used as part of a field. Any line that is blank (after comment stripping) is ignored. Non-blank lines are expected to be of one of three types: rule lines, zone lines, or link lines. .SS "Rule" .sp .LP A rule line has the form: .sp .LP For example: .sp .in +2 .nf Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S .fi .in -2 .sp .sp .LP The fields that make up a rule line are: .sp .in +2 .nf Rule USA 1969 1973 - Apr lastSun 2:00 1:00 D .fi .in -2 .sp .sp .ne 2 .mk .na \fB\fBNAME\fR\fR .ad .RS 12n .rt Gives the (arbitrary) name of the set of rules this rule is part of. .RE .sp .ne 2 .mk .na \fB\fBFROM\fR\fR .ad .RS 12n .rt Gives the first year in which the rule applies. The word \fBminimum\fR (or an abbreviation) means the minimum year with a representable time value. The word \fBmaximum\fR (or an abbreviation) means the maximum year with a representable time value. .RE .sp .ne 2 .mk .na \fB\fBTO\fR\fR .ad .RS 12n .rt Gives the final year in which the rule applies. In addition to \fBminimum\fR and \fBmaximum\fR (as above), the word \fBonly\fR (or an abbreviation) can be used to repeat the value of the \fBFROM\fR field. .RE .sp .ne 2 .mk .na \fB\fBTYPE\fR\fR .ad .RS 12n .rt Gives the type of year in which the rule applies. If \fBTYPE\fR is: .sp .ne 2 .mk .na \fB\&'\fB\(mi\fR\&'\fR .ad .RS 14n .rt The rule applies in all years between \fBFROM\fR and \fBTO\fR, inclusive. .RE .sp .ne 2 .mk .na \fB\fBuspres\fR\fR .ad .RS 14n .rt The rule applies in U.S. Presidential election years. .RE .sp .ne 2 .mk .na \fB\fBnonpres\fR\fR .ad .RS 14n .rt The rule applies in years other than U.S. Presidential election years. .RE .sp .ne 2 .mk .na \fB\fBeven\fR\fR .ad .RS 14n .rt The rule applies to even-numbered years. .RE .sp .ne 2 .mk .na \fB\fBodd\fR\fR .ad .RS 14n .rt The rule applies to odd-numbered years. .RE If \fBTYPE\fR is something else, then \fBzic\fR will attempt to execute the command .sp .in +2 .nf \fByearistype\fR \fIyear\fR \fBtype\fR .fi .in -2 .sp to check the type of a year: an exit status of \fB0\fR means that the year is of the given type; an exit status of \fB1\fR means that the year is not of the given type. The \fByearistype\fR command is not currently provided in the Solaris environment. .RE .sp .ne 2 .mk .na \fB\fBIN\fR\fR .ad .RS 12n .rt Names the month in which the rule takes effect. Month names can be abbreviated. .RE .sp .ne 2 .mk .na \fB\fBON\fR\fR .ad .RS 12n .rt Gives the day on which the rule takes effect. Recognized forms include: .sp .ne 2 .mk .na \fB\fB5\fR\fR .ad .RS 11n .rt the fifth day of the month .RE .sp .ne 2 .mk .na \fB\fBlastSun\fR\fR .ad .RS 11n .rt The last Sunday in the month .RE .sp .ne 2 .mk .na \fB\fBlastMon\fR\fR .ad .RS 11n .rt The last Monday in the month .RE .sp .ne 2 .mk .na \fB\fBSun>=8\fR\fR .ad .RS 11n .rt First Sunday on or after the eighth .RE .sp .ne 2 .mk .na \fB\fBSun<=25\fR\fR .ad .RS 11n .rt Last Sunday on or before the 25th .RE Names of days of the week can be abbreviated or spelled out in full. Note: There cannot be spaces within the \fBON\fR field. .RE .sp .ne 2 .mk .na \fB\fBAT\fR\fR .ad .RS 12n .rt Gives the time of day at which the rule takes effect. Recognized forms include: .sp .ne 2 .mk .na \fB\fB2\fR\fR .ad .RS 11n .rt Time in hours .RE .sp .ne 2 .mk .na \fB\fB2:00\fR\fR .ad .RS 11n .rt Time in hours and minutes .RE .sp .ne 2 .mk .na \fB\fB15:00\fR\fR .ad .RS 11n .rt 24-hour format time (for times after noon) .RE .sp .ne 2 .mk .na \fB\fB1:28:14\fR\fR .ad .RS 11n .rt Time in hours, minutes, and seconds, where hour 0 is midnight at the start of the day and hour 24 is midnight at the end of the day. .RE Any of these forms can be followed by the letter \fBw\fR if the given time is local "wall clock" time; \fBs\fR if the given time is local "standard" time; or \fBu\fR (or \fBg\fR or \fBz\fR) if the given time is universal time. In the absence of an indicator, wall clock time is assumed. .RE .sp .ne 2 .mk .na \fB\fBSAVE\fR\fR .ad .RS 12n .rt Gives the amount of time to be added to local standard time when the rule is in effect. This field has the same format as the \fBAT\fR field (without the \fBw\fR and \fBs\fR suffixes). .RE .sp .ne 2 .mk .na \fB\fBLETTER/S\fR\fR .ad .RS 12n .rt Gives the "variable part" (for example, the "S" or "D" in "EST" or "EDT" of time zone abbreviations to be used when this rule is in effect. If this field is '\fB\(mi\fR\&', the variable part is null. .RE .SS "Zone" .sp .LP A zone line has the form: .sp .in +2 .nf Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] .fi .in -2 .sp .sp .LP For example: .sp .in +2 .nf Zone Australia/SouthWest 9:30 - CST 1992 Mar 15 12:00 8:30 Aus CST .fi .in -2 .sp .sp .LP The fields that make up a zone line are: .sp .ne 2 .mk .na \fB\fBNAME\fR\fR .ad .RS 14n .rt The name of the time zone. This is the name used in creating the time conversion information file for the zone. .RE .sp .ne 2 .mk .na \fB\fBGMTOFF\fR\fR .ad .RS 14n .rt The amount of time to add to \fBUTC\fR to get standard time in this zone. This field has the same format as the \fBAT\fR and \fBSAVE\fR fields of rule lines; begin the field with a minus sign to subtract time from \fBUTC\fR. .RE .sp .ne 2 .mk .na \fB\fBRULES/SAVE\fR\fR .ad .RS 14n .rt The name of the rule(s) that apply in the time zone or, alternately, an amount of time to add to local standard time. If this field is `\fB\(mi\fR\&', then standard time always applies in the time zone. .RE .sp .ne 2 .mk .na \fB\fBFORMAT\fR\fR .ad .RS 14n .rt The format for time zone abbreviations in this time zone. The pair of characters \fB%s\fR is used to show where the "variable part" of the time zone abbreviation goes. Alternately, a slash (/) separates standard and daylight abbreviations. .RE .sp .ne 2 .mk .na \fB\fBUNTIL\fR\fR .ad .RS 14n .rt The time at which the \fBUTC\fR offset or the rule(s) change for a location. It is specified as a year, a month, a day, and a time of day. The time of day has the same format as the \fBAT\fR field of rule lines. If this is specified, the time zone information is generated from the given \fBUTC\fR offset and rule change until the time specified. .sp The month, day, and time of day have the same format as the IN, ON, and AT columns of a rule; trailing columns can be omitted, and default to the earliest possible value for the missing columns. .sp The next line must be a "continuation" line. This line has the same form as a zone line except that the string "Zone" and the name are omitted. The continuation line places information starting at the time specified as the \fBUNTIL\fR field in the previous line in the file used by the previous line. Continuation lines can contain an \fBUNTIL\fR field, just as zone lines do, indicating that the next line is a further continuation. .RE .SS "Link" .sp .LP A link line has the form: .sp .in +2 .nf Link LINK-FROM LINK-TO .fi .in -2 .sp .sp .LP For example: .sp .in +2 .nf Link Europe/Istanbul Asia/Istanbul .fi .in -2 .sp .sp .LP The \fBLINK-FROM\fR field should appear as the \fBNAME\fR field in some zone line; the \fBLINK-TO\fR field is used as an alternate name for that zone. .sp .LP Except for continuation lines, lines can appear in any order in the input. .SH OPTIONS .sp .ne 2 .mk .na \fB\fB--\fR\fIversion\fR\fR .ad .RS 17n .rt Outputs version information and exits. .RE .sp .ne 2 .mk .na \fB\fB-d\fR \fIdirectory\fR\fR .ad .RS 17n .rt Creates time conversion information files in the directory \fIdirectory\fR rather than in the standard directory \fB/usr/share/lib/zoneinfo\fR. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlocaltime\fR\fR .ad .RS 17n .rt Uses the given time zone as local time \fIlocaltime\fR. \fBzic\fR acts as if the file contained a link line of the form: .sp .in +2 .nf Link \fIlocaltime\fR localtime .fi .in -2 .sp .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIposixrules\fR\fR .ad .RS 17n .rt Uses the rules of the given time zone \fIposixrules\fR when handling POSIX-format time zone environment variables. \fBzic\fR acts as if the input contained a link line of the form: .sp .in +2 .nf Link \fIposixrules\fR posixrules .fi .in -2 .sp This option is not used by \fBctime\fR(3C) and \fBmktime\fR(3C) in the Solaris environment. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 17n .rt Limits time values stored in output files to values that are the same whether they are taken to be signed or unsigned. You can use this option to generate SVVS-compatible files. .sp This option is obsolete and may be removed in a future release. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .RS 17n .rt Complains if a year that appears in a data file is outside the range of years representable by system time values (\fB0:00:00 a.m.\fR \fBUTC,\fR \fBJanuary 1\fR, \fB1970\fR, to \fB3:14:07 a.m.\fR \fBUTC,\fR \fBJanuary 19\fR, \fB2038\fR). This option also complains if a time of 24:00 (which cannot be handled by pre-1998 versions of \fBzic\fR) appears in the input. .RE .sp .ne 2 .mk .na \fB\fB-y\fR \fIyearistype\fR\fR .ad .RS 17n .rt Uses the given command \fIyearistype\fR rather than \fByearistype\fR when checking year types (see \fBRules\fR under \fBDESCRIPTION\fR). .RE .SH OPERANDS .sp .ne 2 .mk .na \fB\fIfilename\fR\fR .ad .RS 12n .rt A file containing input lines that specify the time conversion information files to be created. If a \fIfilename\fR is '\fB\(mi\fR\&', the standard input is read. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/usr/share/lib/zoneinfo\fR\fR .ad .sp .6 .RS 4n Standard directory used for created files .RE .sp .ne 2 .mk .na \fB\fB/usr/share/lib/zoneinfo/src\fR\fR .ad .sp .6 .RS 4n Directory containing source files .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted* .TE .sp .LP * The \fB-s\fR option is obsolete. .SH SEE ALSO .sp .LP \fBtime\fR(1), \fBzdump\fR(1M), \fBctime\fR(3C), \fBmktime\fR(3C), \fBattributes\fR(5) .SH NOTES .sp .LP For areas with more than two types of local time, you might need to use local standard time in the \fBAT\fR field of the earliest transition time's rule to ensure that the earliest transition time recorded in the compiled file is correct. .sp .LP If the current \fItimezone\fR file is edited and compiled using the "\fBzic\fR" command, the changes will only be reflected in any new processes that are running. The most accurate way to reflect the changes for the whole system would be a reboot.