1 .\" %%%LICENSE_START(PUBLIC_DOMAIN)
2 .\" This page is in the public domain
5 .TH ZIC 8 2019-03-06 "" "Linux System Administration"
7 zic \- timezone compiler
16 .ie '\(lq'' .ds lq \&"\"
18 .ie '\(rq'' .ds rq \&"\"
21 \\$3\*(lq\\$1\*(rq\\$2
37 program reads text from the file(s) named on the command line
38 and creates the time conversion information files specified in this input.
43 standard input is read.
47 Output version information and exit.
50 Output short usage message and exit.
53 Create time conversion information files in the named directory rather than
54 in the standard directory named below.
61 will act as if the input contained a link line of the form
64 Link \fItimezone\fP localtime
69 rules when handling POSIX-format
70 timezone environment variables.
72 will act as if the input contained a link line of the form
75 Link \fItimezone\fP posixrules
77 .BI "\*-L " leapsecondfilename
78 Read leap second information from the file with the given name.
79 If this option is not used,
80 no leap second information appears in output files.
83 Be more verbose, and complain about the following situations:
86 The input specifies a link to a link.
88 A year that appears in a data file is outside the range
89 of years representable by
93 A time of 24:00 or more appears in the input.
96 prohibit 24:00, and pre-2007 versions prohibit times greater than 24:00.
98 A rule goes past the start or end of the month.
103 The output file does not contain all the information about the
104 long-term future of a timezone, because the future cannot be summarized as
105 an extended POSIX TZ string. For example, as of 2013 this problem
106 occurs for Iran's daylight-saving rules for the predicted future, as
107 these rules are based on the Iranian calendar, which cannot be
110 The output contains data that may not be handled properly by client
111 code designed for older
113 output formats. These compatibility issues affect only timestamps
114 before 1970 or after the start of 2038.
116 A time zone abbreviation has fewer than 3 characters.
117 POSIX requires at least 3.
119 An output file name contains a byte that is not an ASCII letter,
124 or it contains a file name component that contains more than 14 bytes
130 Limit time values stored in output files to values that are the same
131 whether they're taken to be signed or unsigned.
132 You can use this option to generate SVVS-compatible files.
134 Input files should be text files, that is, they should be a series of
135 zero or more lines, each ending in a newline byte and containing at
136 most 511 bytes, and without any NUL bytes. The input text's encoding
137 is typically UTF-8 or ASCII; it should have a unibyte representation
138 for the POSIX Portable Character Set (PPCS)
139 \*<http://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
140 and the encoding's non-unibyte characters should consist entirely of
141 non-PPCS bytes. Non-PPCS characters typically occur only in comments:
142 although output file names and time zone abbreviations can contain
143 nearly any character, other software will work better if these are
144 limited to the restricted syntax described under the
148 Input lines are made up of fields.
149 Fields are separated from one another by one or more white space characters.
150 The white space characters are space, form feed, carriage return, newline,
151 tab, and vertical tab.
152 Leading and trailing white space on input lines is ignored.
153 An unquoted sharp character (#) in the input introduces a comment which extends
154 to the end of the line the sharp character appears on.
155 White space characters and sharp characters may be enclosed in double quotes
156 (") if they're to be used as part of a field.
157 Any line that is blank (after comment stripping) is ignored.
158 Nonblank lines are expected to be of one of three types:
159 rule lines, zone lines, and link lines.
161 Names must be in English and are case insensitive.
162 They appear in several contexts, and include month and weekday names
169 A name can be abbreviated by omitting all but an initial prefix; any
170 abbreviation must be unambiguous in context.
172 A rule line has the form
175 .ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00w\0\0'u +\w'1:00d\0\0'u
177 Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
182 Rule US 1967 1973 \*- Apr lastSun 2:00w 1:00 D
185 The fields that make up a rule line are:
188 Gives the name of the rule set that contains this line.
189 The name must start with a character that is neither
194 To allow for future extensions,
195 an unquoted name should not contain characters from the set
196 .q !$%&'()*,/:;<=>?@[\e]^`{|}~ .
199 Gives the first year in which the rule applies.
200 Any signed integer year can be supplied; the proleptic Gregorian calendar
201 is assumed, with year 0 preceding year 1.
204 (or an abbreviation) means the indefinite past.
207 (or an abbreviation) means the indefinite future.
208 Rules can describe times that are not representable as time values,
209 with the unrepresentable times ignored; this allows rules to be portable
210 among hosts with differing time value types.
213 Gives the final year in which the rule applies.
222 may be used to repeat the value of the
229 and is present for compatibility with older versions of
231 in which it could contain year types.
234 Names the month in which the rule takes effect.
235 Month names may be abbreviated.
238 Gives the day on which the rule takes effect.
239 Recognized forms include:
244 5 the fifth of the month
245 lastSun the last Sunday in the month
246 lastMon the last Monday in the month
247 Sun>=8 first Sunday on or after the eighth
248 Sun<=25 last Sunday on or before the 25th
252 A weekday name (e.g.,
254 or a weekday name preceded by
258 may be abbreviated or spelled out in full.
259 Note that there must be no spaces within the
264 Gives the time of day at which the rule takes effect.
265 Recognized forms include:
269 .ta \w'00:19:32.13\0\0'u
271 2:00 time in hours and minutes
272 01:28:14 time in hours, minutes, and seconds
273 15:00 24-hour format time (for times after noon)
274 260:00 260 hours after 00:00
275 \*-2:30 2.5 hours before 00:00
280 where hour 0 is midnight at the start of the day,
281 and hour 24 is midnight at the end of the day.
282 Any of these forms may be followed by the letter
284 if the given time is local
288 if the given time is local
296 if the given time is universal time;
297 in the absence of an indicator,
298 wall clock time is assumed.
299 The intent is that a rule line describes the instants when a
300 clock/calendar set to the type of time specified in the
302 field would show the specified date and time of day.
305 Gives the amount of time to be added to local standard time when the rule is in
307 This field has the same format as the
310 (although, of course, the
314 suffixes are not used).
315 Negative offsets are allowed; in Ireland, for example, daylight saving
316 time is observed in winter and has a negative offset relative to
318 The offset is merely added to standard time; for example,
320 does not distinguish a 10:30 standard time plus an 0:30
322 from a 10:00 standard time plus a 1:00
336 of time zone abbreviations to be used when this rule is in effect.
339 the variable part is null.
341 A zone line has the form
345 .ta \w'Zone\0\0'u +\w'Asia/Amman\0\0'u +\w'UTOFF\0\0'u +\w'Jordan\0\0'u +\w'FORMAT\0\0'u
346 Zone NAME UTOFF RULES FORMAT [UNTIL]
351 Zone Asia/Amman 2:00 Jordan EE%sT 2017 Oct 27 01:00
354 The fields that make up a zone line are:
357 The name of the timezone.
358 This is the name used in creating the time conversion information file for the
360 It should not contain a file name component
364 a file name component is a maximal substring that does not contain
368 The amount of time to add to UT to get standard time.
369 This field has the same format as the
373 fields of rule lines;
374 begin the field with a minus sign if time must be subtracted from UT.
377 The name of the rules that apply in the timezone or,
378 alternatively, a field in the same format as a rule-line SAVE column,
379 giving of the amount of time to be added to local standard time
380 effect, and whether the resulting time is standard or daylight saving.
383 then standard time always applies.
384 When an amount of time is given, only the sum of standard time and
388 The format for time zone abbreviations.
389 The pair of characters
391 is used to show where the
393 of the time zone abbreviation goes.
394 Alternatively, a format can use the pair of characters
396 to stand for the UT offset in the form
401 using the shortest form that does not lose information, where
406 are the hours, minutes, and seconds east (+) or west (\(mi) of UT.
409 separates standard and daylight abbreviations.
410 To conform to POSIX, a time zone abbreviation should contain only
411 alphanumeric ASCII characters,
417 The time at which the UT offset or the rule(s) change for a location.
418 It takes the form of YEAR [MONTH [DAY [TIME]]].
419 If this is specified,
420 the time zone information is generated from the given UT offset
421 and rule change until the time specified, which is interpreted using
422 the rules in effect just before the transition.
423 The month, day, and time of day have the same format as the IN, ON, and AT
424 fields of a rule; trailing fields can be omitted, and default to the
425 earliest possible value for the missing fields.
427 The next line must be a
429 line; this has the same form as a zone line except that the
432 and the name are omitted, as the continuation line will
433 place information starting at the time specified as the
435 information in the previous line in the file used by the previous line.
436 Continuation lines may contain
438 information, just as zone lines do, indicating that the next line is a further
441 If a zone changes at the same instant that a rule would otherwise take
442 effect in the earlier zone or continuation line, the rule is ignored.
443 In a single zone it is an error if two rules take effect at the same
444 instant, or if two zone changes take effect at the same instant.
446 A link line has the form
450 .ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u
451 Link TARGET LINK-NAME
456 Link Europe/Istanbul Asia/Istanbul
461 field should appear as the
463 field in some zone line.
466 field is used as an alternative name for that zone;
467 it has the same syntax as a zone line's
471 Except for continuation lines,
472 lines may appear in any order in the input.
473 However, the behavior is unspecified if multiple zone or link lines
474 define the same name, or if the source of one link line is the target
477 Lines in the file that describes leap seconds have the following form:
480 .ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u
482 Leap YEAR MONTH DAY HH:MM:SS CORR R/S
487 Leap 2016 Dec 31 23:59:60 + S
496 fields tell when the leap second happened.
502 if a second was added
505 if a second was skipped.
509 should be (an abbreviation of)
511 if the leap second time given by the other fields should be interpreted as UTC
515 if the leap second time given by the other fields should be interpreted as
516 local wall clock time.
517 .SH "EXTENDED EXAMPLE"
518 Here is an extended example of
520 input, intended to illustrate many of its features.
521 In this example, the EU rules are for the European Union
522 and for its predecessor organization, the European Communities.
527 .ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
529 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
530 Rule Swiss 1941 1942 \*- May Mon>=1 1:00 1:00 S
531 Rule Swiss 1941 1942 \*- Oct Mon>=1 2:00 0 \*-
533 Rule EU 1977 1980 \*- Apr Sun>=1 1:00u 1:00 S
534 Rule EU 1977 only \*- Sep lastSun 1:00u 0 \*-
535 Rule EU 1978 only \*- Oct 1 1:00u 0 \*-
536 Rule EU 1979 1995 \*- Sep lastSun 1:00u 0 \*-
537 Rule EU 1981 max \*- Mar lastSun 1:00u 1:00 S
538 Rule EU 1996 max \*- Oct lastSun 1:00u 0 \*-
540 .ta \w'# Zone\0\0'u +\w'Europe/Zurich\0\0'u +\w'0:34:08\0\0'u +\w'RULES\0\0'u +\w'FORMAT\0\0'u
541 # Zone NAME UTOFF RULES FORMAT [UNTIL]
542 Zone Europe/Zurich 0:34:08 \*- LMT 1853 Jul 16
543 0:29:46 \*- BMT 1894 Jun
544 1:00 Swiss CE%sT 1981
547 Link Europe/Zurich Europe/Vaduz
551 In this example, the timezone is named Europe/Zurich but it has an alias
552 as Europe/Vaduz. This example says that Zurich was 34 minutes and 8
553 seconds east of UT until 1853-07-16 at 00:00, when the legal offset
554 was changed to 7\(de\|26\(fm\|22.50\(sd; although this works out to
555 0:29:45.50, the input format cannot represent fractional seconds so it
556 is rounded here. After 1894-06-01 at 00:00 the UT offset became one hour
557 and Swiss daylight saving rules (defined with lines beginning with
559 apply. From 1981 to the present, EU daylight saving rules have
560 applied, and the UTC offset has remained at one hour.
562 In 1941 and 1942, daylight saving time applied from the first Monday
563 in May at 01:00 to the first Monday in October at 02:00.
564 The pre-1981 EU daylight-saving rules have no effect
565 here, but are included for completeness. Since 1981, daylight
566 saving has begun on the last Sunday in March at 01:00 UTC.
567 Until 1995 it ended the last Sunday in September at 01:00 UTC,
568 but this changed to the last Sunday in October starting in 1996.
570 For purposes of display,
574 were initially used, respectively. Since
575 Swiss rules and later EU rules were applied, the time zone abbreviation
576 has been CET for standard time and CEST for daylight saving
581 Default local timezone file.
583 .I /usr/share/zoneinfo
584 Default timezone information directory.
586 For areas with more than two types of local time,
587 you may need to use local standard time in the
589 field of the earliest transition time's rule to ensure that
590 the earliest transition time recorded in the compiled file is correct.
593 for a particular timezone,
594 a clock advance caused by the start of daylight saving
595 coincides with and is equal to
596 a clock retreat caused by a change in UT offset,
598 produces a single transition to daylight saving at the new UT offset
599 (without any change in wall clock time).
600 To get separate transitions
601 use multiple zone continuation lines
602 specifying transition instants using universal time.
606 .\" This file is in the public domain, so clarified as of
607 .\" 2009-05-17 by Arthur David Olson.