1 .\" $NetBSD: zic.8,v 1.16 2009/12/31 22:49:16 mlelstv Exp $
13 .Op Fl L Ar leapsecondfilename
15 .Op Fl p Ar posixrules
22 reads text from the file(s) named on the command line
23 and creates the time conversion information files specified in this input.
28 the standard input is read.
30 These options are available:
31 .Bl -tag -width XXXXXXXXXX -compact
33 Output version information and exit.
35 Create time conversion information files in the named directory rather than
36 in the standard directory named below.
37 .It Fl L Ar leapsecondfilename
38 Read leap second information from the file with the given name.
39 If this option is not used,
40 no leap second information appears in output files.
42 Use the given time zone as local time.
44 will act as if the input contained a link line of the form
45 .Dl Link timezone localtime
47 Use the given time zone's rules when handling POSIX-format
48 time zone environment variables.
50 will act as if the input contained a link line of the form
51 .Dl Link timezone posixrules
53 Limit time values stored in output files to values that are the same
54 whether they're taken to be signed or unsigned.
55 You can use this option to generate SVVS-compatible files.
57 Complain if a year that appears in a data file is outside the range
58 of years representable by
61 Also complain if a time of 24:00
62 .Pq which cannot be handled by pre-1998 versions of Nm
69 when checking year types (see below).
71 Input lines are made up of fields.
72 Fields are separated from one another by any number of white space characters.
73 Leading and trailing white space on input lines is ignored.
74 An unquoted sharp character (#) in the input introduces a comment which extends
75 to the end of the line the sharp character appears on.
76 White space characters and sharp characters may be enclosed in double
80 if they're to be used as part of a field.
81 Any line that is blank (after comment stripping) is ignored.
82 Non-blank lines are expected to be of one of three types:
83 rule lines, zone lines, and link lines.
85 A rule line has the form
86 .Dl Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
88 .Dl Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D
89 The fields that make up a rule line are:
90 .Bl -tag -width "LETTER/S" -compact
92 Gives the (arbitrary) name of the set of rules this rule is part of.
94 Gives the first year in which the rule applies.
95 Any integer year can be supplied; the Gregorian calendar is assumed.
98 (or an abbreviation) means the minimum year representable as an integer.
101 (or an abbreviation) means the maximum year representable as an integer.
102 Rules can describe times that are not representable as time values,
103 with the unrepresentable times ignored; this allows rules to be portable
104 among hosts with differing time value types.
106 Gives the final year in which the rule applies.
115 may be used to repeat the value of the
119 Gives the type of year in which the rule applies.
124 then the rule applies in all years between
131 is something else, then
135 .Ic yearistype Ar year type
137 to check the type of a year:
138 an exit status of zero is taken to mean that the year is of the given type;
139 an exit status of one is taken to mean that the year is not of the given type.
141 Names the month in which the rule takes effect.
142 Month names may be abbreviated.
144 Gives the day on which the rule takes effect.
145 Recognized forms include:
146 .Bl -tag -width lastSun -compact -offset indent
148 the fifth of the month
150 the last Sunday in the month
152 the last Monday in the month
154 first Sunday on or after the eighth
156 last Sunday on or before the 25th
158 Names of days of the week may be abbreviated or spelled out in full.
159 Note that there must be no spaces within the
163 Gives the time of day at which the rule takes effect.
164 Recognized forms include:
165 .Bl -tag -width "1X28X14" -compact -offset indent
169 time in hours and minutes
171 24-hour format time (for times after noon)
173 time in hours, minutes, and seconds
177 where hour 0 is midnight at the start of the day,
178 and hour 24 is midnight at the end of the day.
179 Any of these forms may be followed by the letter
181 if the given time is local
185 if the given time is local
193 if the given time is universal time;
194 in the absence of an indicator,
195 wall clock time is assumed.
197 Gives the amount of time to be added to local standard time when the rule is in
199 This field has the same format as the
202 (although, of course, the
206 suffixes are not used).
218 of time zone abbreviations to be used when this rule is in effect.
221 the variable part is null.
224 A zone line has the form
226 .Dl Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]]
228 .Dl Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00
229 The fields that make up a zone line are:
230 .Bl -tag -width "RULES/SAVE" -compact
232 The name of the time zone.
233 This is the name used in creating the time conversion information file for the
236 The amount of time to add to UTC to get standard time in this zone.
237 This field has the same format as the
241 fields of rule lines;
242 begin the field with a minus sign if time must be subtracted from UTC.
244 The name of the rule(s) that apply in the time zone or,
245 alternatively, an amount of time to add to local standard time.
248 then standard time always applies in the time zone.
250 The format for time zone abbreviations in this time zone.
251 The pair of characters
253 is used to show where the
255 of the time zone abbreviation goes.
259 separates standard and daylight abbreviations.
260 .It UNTILYEAR [MONTH [DAY [TIME]]]
261 The time at which the UTC offset or the rule(s) change for a location.
262 It is specified as a year, a month, a day, and a time of day.
263 If this is specified,
264 the time zone information is generated from the given UTC offset
265 and rule change until the time specified.
266 The month, day, and time of day have the same format as the IN, ON, and AT
267 fields of a rule; trailing fields can be omitted, and default to the
268 earliest possible value for the missing fields.
270 The next line must be a
272 line; this has the same form as a zone line except that the
275 and the name are omitted, as the continuation line will
276 place information starting at the time specified as the
278 information in the previous line in the file used by the previous line.
279 Continuation lines may contain
281 information, just as zone lines do, indicating that the next line is a further
284 A link line has the form
285 .Dl Link LINK-FROM LINK-TO
287 .Dl Link Europe/Istanbul Asia/Istanbul
290 field should appear as the
292 field in some zone line;
295 field is used as an alternative name for that zone.
297 Except for continuation lines,
298 lines may appear in any order in the input.
300 Lines in the file that describes leap seconds have the following form:
301 .Dl Leap YEAR MONTH DAY HH:MM:SS CORR R/S
303 .Dl Leap 1974 Dec 31 23:59:60 + S
310 fields tell when the leap second happened.
316 if a second was added
319 if a second was skipped.
320 .\" There's no need to document the following, since it's impossible for more
321 .\" than one leap second to be inserted or deleted at a time.
322 .\" The C Standard is in error in suggesting the possibility.
323 .\" See Terry J Quinn, The BIPM and the accurate measure of time,
324 .\" Proc IEEE 79, 7 (July 1991), 894-905.
327 .\" if two seconds were added
330 .\" if two seconds were skipped.
334 should be (an abbreviation of)
336 if the leap second time given by the other fields should be interpreted as UTC
340 if the leap second time given by the other fields should be interpreted as
341 local wall clock time.
344 Here is an extended example of
346 input, intended to illustrate many of its features.
347 .Bl -column -compact "# Rule" "Swiss" "FROM" "1995" "TYPE" "Oct" "lastSun" "1:00u" "SAVE" "LETTER/S"
348 .It # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
349 .It Rule Swiss 1940 only - Nov 2 0:00 1:00 S
350 .It Rule Swiss 1940 only - Dec 31 0:00 0 -
351 .It Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 S
352 .It Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0
354 .It Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
355 .It Rule EU 1977 only - Sep lastSun 1:00u 0 -
356 .It Rule EU 1978 only - Oct 1 1:00u 0 -
357 .It Rule EU 1979 1995 - Sep lastSun 1:00u 0 -
358 .It Rule EU 1981 max - Mar lastSun 1:00u 1:00 S
359 .It Rule EU 1996 max - Oct lastSun 1:00u 0 -
362 .Bl -column -compact "# Zone" "Europe/Zurich" "0:29:44" "RULES" "FORMAT" "UNTIL"
363 .It # Zone NAME GMTOFF RULES FORMAT UNTIL
364 .It Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
365 .It 0:29:44 - BMT 1894 Jun
366 .It 1:00 Swiss CE%sT 1981
368 .It Link Europe/Zurich Switzerland
371 In this example, the zone is named Europe/Zurich but it has an alias
372 as Switzerland. Zurich was 34 minutes and 8 seconds west of GMT until
373 1848-09-12 at 00:00, when the offset changed to 29 minutes and 44
374 seconds. After 1894-06-01 at 00:00 Swiss daylight saving rules (defined
375 with lines beginning with "Rule Swiss") apply, and the GMT offset
376 became one hour. From 1981 to the present, EU daylight saving rules have
377 applied, and the UTC offset has remained at one hour.
379 In 1940, daylight saving time applied from November 2 at 00:00 to
380 December 31 at 00:00. In 1941 and 1942, daylight saving time applied
381 from the first Sunday in May at 02:00 to the first Sunday in October
383 The pre-1981 EU daylight-saving rules have no effect
384 here, but are included for completeness. Since 1981, daylight
385 saving has begun on the last Sunday in March at 01:00 UTC.
386 Until 1995 it ended the last Sunday in September at 01:00 UTC,
387 but this changed to the last Sunday in October starting in 1996.
390 display, "LMT" and "BMT" were initially used, respectively. Since
391 Swiss rules and later EU rules were applied, the display name for the
392 timezone has been CET for standard time and CEST for daylight saving
395 For areas with more than two types of local time,
396 you may need to use local standard time in the
398 field of the earliest transition time's rule to ensure that
399 the earliest transition time recorded in the compiled file is correct.
402 for a particular zone,
403 a clock advance caused by the start of daylight saving
404 coincides with and is equal to
405 a clock retreat caused by a change in UTC offset,
407 produces a single transition to daylight saving at the new UTC offset
408 (without any change in wall clock time).
409 To get separate transitions
410 use multiple zone continuation lines
411 specifying transition instants using universal time.
413 .Pa /usr/share/zoneinfo
414 - standard directory used for created files
420 .\" This file is in the public domain, so clarified as of
421 .\" 2009-05-17 by Arthur David Olson.