zic
时间:2006-08-02 来源:anima
zic
zic [options] [files]
System administration command. Create time conversion information files from the file or files specified. If the specified file is -, read information from standard input.
Options
-d directoryPlace the newly created files in directory. Default is /usr/local/etc/zoneinfo.
-l timezoneSpecify a timezone to use for local time. zic links the zone information for timezone with the zone localtime.
-p timezoneSet the default rules for handling POSIX-format environment variables to the zone name specified by timezone.
-sStore time values only if they are the same when signed as when unsigned.
-vVerbose mode. Include extra error checking and warnings.
-y commandCheck year types with command. Default is yearistype.
-L fileConsult file for information about leap seconds.
The source files for zic should be formatted as a sequence of rule lines, zone lines, and link lines. An optional file containing leap-second rules can be specified on the command line. Rule lines describe how time should be calculated. They describe changes in time, daylight savings time, and any other changes that might affect a particular time zone. Zone lines specify which rules apply to a given zone. Link lines link similar zones together. Leap lines describe the exact time when leap seconds should be added or subtracted. Each of these lines is made up of fields. Fields are separated from one another by any number of whitespace characters. Comment lines are preceded by #. The fields used in each line are listed in the next section.
Rule line fields
The format of a rule line is:
Rule NAME FROM TO TYPE IN ON AT SAVE LETTERS
NAMEName this set of rules.
FROMSpecify the first year to which this rule applies. Gregorian calendar dates are assumed. Instead of specifying an actual year, you may specify minimum or maximum for the minimum or maximum year, representable as an integer.
TOSpecify the last year to which this rule applies. Syntax is the same as for the FROM field.
TYPESpecify the type of year to which this rule should be applied. The wildcard - instructs that all years be included. Any given year's type will be checked with the command given with the -y option or the default yearistype year type. An exit status of 0 is taken to mean the year is of the given type; an exit status of 1 means that it is not of the given type (see -y option).
INSpecify month in which this rule should be applied.
ONSpecify day on which this rule should be applied. Whitespace is not allowed. For example:
1The 1st.
firstSunThe first Sunday.
Sun>=3The first Sunday to occur before or on the 3rd.
ATSpecify the time after which the rule is in effect. For example, you may use 13, 13:00, or 13:00:00 for 1:00 p.m. You may include one of several suffixes (without whitespace between):
sLocal standard time.
u, g, zUniversal time.
wWall clock time (default).
SAVEAdd this amount of time to the local standard time. Formatted like AT, without suffixes.
LETTERSSpecify letter or letters to be used in time zone abbreviations (for example, S for EST). For no abbreviation, enter -.
Zone line fields
The format of a zone line is:
Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
NAMETime zone name.
GMTOFFThe amount of hours by which this time zone differs from GMT. Formatted like AT. Negative times are subtracted from GMT; by default, times are added to it.
RULES/SAVEEither the name of the rule to apply to this zone or the amount of time to add to local standard time. To make the zone the same as local standard time, specify -.
FORMATThe format of time zone abbreviations. Specify the variable part with %s.
UNTILChange the rule for the zone at this date. The next line must specify the new zone information and therefore must omit the string "Zone" and the NAME field.
Link line fields
The format of a link line is:
Link LINK-FROM LINK-TO
LINK-FROMThe name of the zone that is being linked.
LINK-TOAn alternate name for the zone that was specified as LINK-FROM.
Leap line fields
The format of a leap line is:
Leap YEAR MONTH DAY HH:MM:SS CORR R|S
YEAR MONTH DAY HH:MM:SSSpecify when the leap second happened.
CORRUses + or - to show whether the second was added or skipped.
R|SRolling or Stationary. Describe whether the leap second should be applied to local wall-clock time or GMT, respectively.