4 zic - time zone compiler
7 zic [ --version ] [ -v ] [ -d directory ] [ -l localtime ] [ -p
8 posixrules ] [ -L leapsecondfilename ] [ -s ] [ -y command ] [ filename
12 Zic reads text from the file(s) named on the command line and creates
13 the time conversion information files specified in this input. If a
14 filename is -, the standard input is read.
16 These options are available:
19 Output version information and exit.
22 Create time conversion information files in the named directory
23 rather than in the standard directory named below.
26 Use the given time zone as local time. Zic will act as if the
27 input contained a link line of the form
29 Link timezone localtime
32 Use the given time zone's rules when handling POSIX-format time
33 zone environment variables. Zic will act as if the input
34 contained a link line of the form
36 Link timezone posixrules
39 Read leap second information from the file with the given name.
40 If this option is not used, no leap second information appears
43 -v Complain if a year that appears in a data file is outside the
44 range of years representable by time(2) values. Also complain
45 if a time of 24:00 (which cannot be handled by pre-1998 versions
46 of zic) appears in the input.
48 -s Limit time values stored in output files to values that are the
49 same whether they're taken to be signed or unsigned. You can
50 use this option to generate SVVS-compatible files.
53 Use the given command rather than yearistype when checking year
56 Input lines are made up of fields. Fields are separated from one
57 another by any number of white space characters. Leading and trailing
58 white space on input lines is ignored. An unquoted sharp character (#)
59 in the input introduces a comment which extends to the end of the line
60 the sharp character appears on. White space characters and sharp
61 characters may be enclosed in double quotes (") if they're to be used
62 as part of a field. Any line that is blank (after comment stripping)
63 is ignored. Non-blank lines are expected to be of one of three types:
64 rule lines, zone lines, and link lines.
66 Names (such as month names) must be in English and are case
67 insensitive. Abbreviations, if used, must be unambiguous in context.
69 A rule line has the form
71 Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
75 Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
77 The fields that make up a rule line are:
79 NAME Gives the (arbitrary) name of the set of rules this rule is
82 FROM Gives the first year in which the rule applies. Any integer
83 year can be supplied; the Gregorian calendar is assumed. The
84 word minimum (or an abbreviation) means the minimum year
85 representable as an integer. The word maximum (or an
86 abbreviation) means the maximum year representable as an
87 integer. Rules can describe times that are not representable
88 as time values, with the unrepresentable times ignored; this
89 allows rules to be portable among hosts with differing time
92 TO Gives the final year in which the rule applies. In addition to
93 minimum and maximum (as above), the word only (or an
94 abbreviation) may be used to repeat the value of the FROM
97 TYPE Gives the type of year in which the rule applies. If TYPE is -
98 then the rule applies in all years between FROM and TO
99 inclusive. If TYPE is something else, then zic executes the
102 to check the type of a year: an exit status of zero is taken to
103 mean that the year is of the given type; an exit status of one
104 is taken to mean that the year is not of the given type.
106 IN Names the month in which the rule takes effect. Month names
109 ON Gives the day on which the rule takes effect. Recognized forms
112 5 the fifth of the month
113 lastSun the last Sunday in the month
114 lastMon the last Monday in the month
115 Sun>=8 first Sunday on or after the eighth
116 Sun<=25 last Sunday on or before the 25th
118 Names of days of the week may be abbreviated or spelled out in
119 full. Note that there must be no spaces within the ON field.
121 AT Gives the time of day at which the rule takes effect.
122 Recognized forms include:
125 2:00 time in hours and minutes
126 15:00 24-hour format time (for times after noon)
127 1:28:14 time in hours, minutes, and seconds
130 where hour 0 is midnight at the start of the day, and hour 24
131 is midnight at the end of the day. Any of these forms may be
132 followed by the letter w if the given time is local "wall
133 clock" time, s if the given time is local "standard" time, or u
134 (or g or z) if the given time is universal time; in the absence
135 of an indicator, wall clock time is assumed.
137 SAVE Gives the amount of time to be added to local standard time
138 when the rule is in effect. This field has the same format as
139 the AT field (although, of course, the w and s suffixes are not
143 Gives the "variable part" (for example, the "S" or "D" in "EST"
144 or "EDT") of time zone abbreviations to be used when this rule
145 is in effect. If this field is -, the variable part is null.
147 A zone line has the form
149 Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]]
153 Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00
155 The fields that make up a zone line are:
157 NAME The name of the time zone. This is the name used in creating the
158 time conversion information file for the zone.
161 The amount of time to add to UTC to get standard time in this
162 zone. This field has the same format as the AT and SAVE fields
163 of rule lines; begin the field with a minus sign if time must be
167 The name of the rule(s) that apply in the time zone or,
168 alternately, an amount of time to add to local standard time. If
169 this field is - then standard time always applies in the time
173 The format for time zone abbreviations in this time zone. The
174 pair of characters %s is used to show where the "variable part"
175 of the time zone abbreviation goes. Alternately, a slash (/)
176 separates standard and daylight abbreviations.
178 UNTILYEAR [MONTH [DAY [TIME]]]
179 The time at which the UTC offset or the rule(s) change for a
180 location. It is specified as a year, a month, a day, and a time
181 of day. If this is specified, the time zone information is
182 generated from the given UTC offset and rule change until the
183 time specified. The month, day, and time of day have the same
184 format as the IN, ON, and AT fields of a rule; trailing fields
185 can be omitted, and default to the earliest possible value for
188 The next line must be a "continuation" line; this has the same
189 form as a zone line except that the string "Zone" and the name
190 are omitted, as the continuation line will place information
191 starting at the time specified as the "until" information in the
192 previous line in the file used by the previous line.
193 Continuation lines may contain "until" information, just as zone
194 lines do, indicating that the next line is a further
197 A link line has the form
199 Link LINK-FROM LINK-TO
203 Link Europe/Istanbul Asia/Istanbul
205 The LINK-FROM field should appear as the NAME field in some zone line;
206 the LINK-TO field is used as an alternate name for that zone.
208 Except for continuation lines, lines may appear in any order in the
211 Lines in the file that describes leap seconds have the following form:
213 Leap YEAR MONTH DAY HH:MM:SS CORR R/S
217 Leap 1974 Dec 31 23:59:60 + S
219 The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap second
220 happened. The CORR field should be "+" if a second was added or "-" if
221 a second was skipped. The R/S field should be (an abbreviation of)
222 "Stationary" if the leap second time given by the other fields should
223 be interpreted as UTC or (an abbreviation of) "Rolling" if the leap
224 second time given by the other fields should be interpreted as local
228 Here is an extended example of zic input, intended to illustrate many
231 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
232 Rule Swiss 1940 only - Nov 2 0:00 1:00 S
233 Rule Swiss 1940 only - Dec 31 0:00 0 -
234 Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 S
235 Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0
236 Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
237 Rule EU 1977 only - Sep lastSun 1:00u 0 -
238 Rule EU 1978 only - Oct 1 1:00u 0 -
239 Rule EU 1979 1995 - Sep lastSun 1:00u 0 -
240 Rule EU 1981 max - Mar lastSun 1:00u 1:00 S
241 Rule EU 1996 max - Oct lastSun 1:00u 0 -
243 # Zone NAME GMTOFF RULES FORMAT UNTIL
244 Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
245 0:29:44 - BMT 1894 Jun
246 1:00 Swiss CE%sT 1981
249 Link Europe/Zurich Switzerland
251 In this example, the zone is named Europe/Zurich but it has an alias as
252 Switzerland. Zurich was 34 minutes and 8 seconds west of GMT until
253 1848-09-12 at 00:00, when the offset changed to 29 minutes and 44
254 seconds. After 1894-06-01 at 00:00 Swiss daylight saving rules
255 (defined with lines beginning with "Rule Swiss") apply, and the GMT
256 offset became one hour. From 1981 to the present, EU daylight saving
257 rules have applied, and the UTC offset has remained at one hour.
259 In 1940, daylight saving time applied from November 2 at 00:00 to
260 December 31 at 00:00. In 1941 and 1942, daylight saving time applied
261 from the first Sunday in May at 02:00 to the first Sunday in October at
262 00:00. The pre-1981 EU daylight-saving rules have no effect here, but
263 are included for completeness. Since 1981, daylight saving has begun
264 on the last Sunday in March at 01:00 UTC. Until 1995 it ended the last
265 Sunday in September at 01:00 UTC, but this changed to the last Sunday
266 in October starting in 1996.
268 For purposes of display, "LMT" and "BMT" were initially used,
269 respectively. Since Swiss rules and later EU rules were applied, the
270 display name for the timezone has been CET for standard time and CEST
271 for daylight saving time.
274 For areas with more than two types of local time, you may need to use
275 local standard time in the AT field of the earliest transition time's
276 rule to ensure that the earliest transition time recorded in the
277 compiled file is correct.
279 If, for a particular zone, a clock advance caused by the start of
280 daylight saving coincides with and is equal to a clock retreat caused
281 by a change in UTC offset, zic produces a single transition to daylight
282 saving at the new UTC offset (without any change in wall clock time).
283 To get separate transitions use multiple zone continuation lines
284 specifying transition instants using universal time.
287 /usr/local/etc/zoneinfo standard directory used for created
291 newctime(3), tzfile(5), zdump(8)