1ZIC(8)                    Linux System Administration                   ZIC(8)
2
3
4

NAME

6       zic - timezone compiler
7

SYNOPSIS

9       zic [ option ... ] [ filename ... ]
10

DESCRIPTION

12       The  zic  program reads text from the file(s) named on the command line
13       and creates the time conversion information  files  specified  in  this
14       input.  If a filename is “-”, standard input is read.
15

OPTIONS

17       --version
18              Output version information and exit.
19
20       --help Output short usage message and exit.
21
22       -d directory
23              Create  time conversion information files in the named directory
24              rather than in the standard directory named below.
25
26       -l timezone
27              Use timezone as local time.  zic will act as if the  input  con‐
28              tained a link line of the form
29
30                   Link timezone       localtime
31
32       -p timezone
33              Use  timezone's  rules when handling POSIX-format timezone envi‐
34              ronment variables.  zic will act as if  the  input  contained  a
35              link line of the form
36
37                   Link timezone       posixrules
38
39       -L leapsecondfilename
40              Read  leap second information from the file with the given name.
41              If this option is not used, no leap second  information  appears
42              in output files.
43
44       -v     Be more verbose, and complain about the following situations:
45
46              The input specifies a link to a link.
47
48              A year that appears in a data file is outside the range of years
49              representable by time(2) values.
50
51              A time of 24:00 or more appears in the input.  Pre-1998 versions
52              of  zic  prohibit  24:00,  and  pre-2007 versions prohibit times
53              greater than 24:00.
54
55              A rule goes past the start or end of the month.   Pre-2004  ver‐
56              sions of zic prohibit this.
57
58              The  output  file does not contain all the information about the
59              long-term future of a timezone, because  the  future  cannot  be
60              summarized  as  an extended POSIX TZ string.  For example, as of
61              2013 this problem occurs for Iran's  daylight-saving  rules  for
62              the  predicted  future,  as these rules are based on the Iranian
63              calendar, which cannot be represented.
64
65              The output contains data that may not  be  handled  properly  by
66              client  code  designed for older zic output formats.  These com‐
67              patibility issues affect only timestamps before  1970  or  after
68              the start of 2038.
69
70              A  time  zone  abbreviation  has fewer than 3 characters.  POSIX
71              requires at least 3.
72
73              An output file name contains a byte that is not an ASCII letter,
74              “-”, “/”, or “_”; or it contains a file name component that con‐
75              tains more than 14 bytes or that starts with “-”.
76
77       -s     Limit time values stored in output files to values that are  the
78              same  whether  they're  taken to be signed or unsigned.  You can
79              use this option to generate SVVS-compatible files.
80
81       Input files should be text files, that is, they should be a  series  of
82       zero  or  more  lines,  each ending in a newline byte and containing at
83       most 511 bytes, and without any NUL bytes.  The input  text's  encoding
84       is  typically  UTF-8  or ASCII; it should have a unibyte representation
85       for the POSIX Portable Character Set (PPCS) ⟨http://pubs.opengroup.org/
86       onlinepubs/9699919799/basedefs/V1_chap06.html⟩  and the encoding's non-
87       unibyte characters should consist entirely of non-PPCS bytes.  Non-PPCS
88       characters typically occur only in comments: although output file names
89       and time zone abbreviations can contain  nearly  any  character,  other
90       software will work better if these are limited to the restricted syntax
91       described under the -v option.
92
93       Input lines are made up of  fields.   Fields  are  separated  from  one
94       another by one or more white space characters.  The white space charac‐
95       ters are space, form feed, carriage return, newline, tab, and  vertical
96       tab.   Leading  and trailing white space on input lines is ignored.  An
97       unquoted sharp character (#) in the input introduces  a  comment  which
98       extends  to  the end of the line the sharp character appears on.  White
99       space characters and sharp characters may be enclosed in double  quotes
100       (")  if  they're to be used as part of a field.  Any line that is blank
101       (after comment stripping) is ignored.  Nonblank lines are  expected  to
102       be of one of three types: rule lines, zone lines, and link lines.
103
104       Names must be in English and are case insensitive.  They appear in sev‐
105       eral contexts, and include month and weekday names and keywords such as
106       maximum,  only,  Rolling, and Zone.  A name can be abbreviated by omit‐
107       ting all but an initial prefix; any abbreviation must be unambiguous in
108       context.
109
110       A rule line has the form
111
112            Rule  NAME  FROM  TO    TYPE  IN   ON       AT     SAVE   LETTER/S
113
114       For example:
115
116            Rule  US    1967  1973  -     Apr  lastSun  2:00w  1:00   D
117
118       The fields that make up a rule line are:
119
120       NAME    Gives  the  name  of the rule set that contains this line.  The
121               name must start with a character that is neither an ASCII digit
122               nor  “-”  nor “+”.  To allow for future extensions, an unquoted
123               name   should   not   contain   characters   from    the    set
124               “!$%&'()*,/:;<=>?@[\]^`{|}~”.
125
126       FROM    Gives  the  first  year  in which the rule applies.  Any signed
127               integer year can be supplied; the proleptic Gregorian  calendar
128               is assumed, with year 0 preceding year 1.  The word minimum (or
129               an abbreviation) means the indefinite past.  The  word  maximum
130               (or  an  abbreviation)  means the indefinite future.  Rules can
131               describe times that are not representable as time values,  with
132               the unrepresentable times ignored; this allows rules to be por‐
133               table among hosts with differing time value types.
134
135       TO      Gives the final year in which the rule applies.  In addition to
136               minimum  and maximum (as above), the word only (or an abbrevia‐
137               tion) may be used to repeat the value of the FROM field.
138
139       TYPE    should be “-” and is present for compatibility with older  ver‐
140               sions of zic in which it could contain year types.
141
142       IN      Names  the  month  in which the rule takes effect.  Month names
143               may be abbreviated.
144
145       ON      Gives the day on which the rule takes effect.  Recognized forms
146               include:
147
148                    5        the fifth of the month
149                    lastSun  the last Sunday in the month
150                    lastMon  the last Monday in the month
151                    Sun>=8   first Sunday on or after the eighth
152                    Sun<=25  last Sunday on or before the 25th
153
154               A  weekday  name  (e.g.,  Sunday) or a weekday name preceded by
155               “last” (e.g., lastSunday) may be abbreviated or spelled out  in
156               full.  Note that there must be no spaces within the ON field.
157
158       AT      Gives  the  time of day at which the rule takes effect.  Recog‐
159               nized forms include:
160
161                    2            time in hours
162                    2:00         time in hours and minutes
163                    01:28:14     time in hours, minutes, and seconds
164                    15:00        24-hour format time (for times after noon)
165                    260:00       260 hours after 00:00
166                    -2:30        2.5 hours before 00:00
167                    -            equivalent to 0
168
169               where hour 0 is midnight at the start of the day, and  hour  24
170               is  midnight  at the end of the day.  Any of these forms may be
171               followed by the letter w if  the  given  time  is  local  “wall
172               clock” time, s if the given time is local “standard” time, or u
173               (or g or z) if the given time is universal time; in the absence
174               of  an  indicator,  wall  clock time is assumed.  The intent is
175               that a rule line describes the instants when  a  clock/calendar
176               set  to  the  type of time specified in the AT field would show
177               the specified date and time of day.
178
179       SAVE    Gives the amount of time to be added  to  local  standard  time
180               when  the rule is in effect.  This field has the same format as
181               the AT field (although, of course, the w and s suffixes are not
182               used).   Negative offsets are allowed; in Ireland, for example,
183               daylight saving time is observed in winter and has  a  negative
184               offset  relative  to Irish Standard Time.  The offset is merely
185               added to standard time; for example, zic does not distinguish a
186               10:30  standard  time  plus  an 0:30 SAVE from a 10:00 standard
187               time plus a 1:00 SAVE.
188
189       LETTER/S
190               Gives the “variable part” (for example, the “S” or “D” in “EST”
191               or  “EDT”) of time zone abbreviations to be used when this rule
192               is in effect.  If this field is “-”, the variable part is null.
193
194       A zone line has the form
195
196            Zone  NAME        UTOFF  RULES   FORMAT  [UNTIL]
197
198       For example:
199
200            Zone  Asia/Amman  2:00   Jordan  EE%sT   2017 Oct 27 01:00
201
202       The fields that make up a zone line are:
203
204       NAME The name of the timezone.  This is the name used in  creating  the
205            time  conversion information file for the timezone.  It should not
206            contain a file name component “.” or “..”; a file  name  component
207            is a maximal substring that does not contain “/”.
208
209       UTOFF
210            The  amount of time to add to UT to get standard time.  This field
211            has the same format as the AT and SAVE fields of rule lines; begin
212            the field with a minus sign if time must be subtracted from UT.
213
214       RULES
215            The  name  of  the  rules  that apply in the timezone or, alterna‐
216            tively, a field in the same format as  a  rule-line  SAVE  column,
217            giving  of  the  amount of time to be added to local standard time
218            effect, and whether the resulting time  is  standard  or  daylight
219            saving.   If  this  field  is - then standard time always applies.
220            When an amount of time is given, only the sum of standard time and
221            this amount matters.
222
223       FORMAT
224            The format for time zone abbreviations.  The pair of characters %s
225            is used to show where the “variable part” of the time zone  abbre‐
226            viation goes.  Alternatively, a format can use the pair of charac‐
227            ters %z to stand for the UT offset in  the  form  ±hh,  ±hhmm,  or
228            ±hhmmss,  using  the shortest form that does not lose information,
229            where hh, mm, and ss are the hours, minutes, and seconds east  (+)
230            or  west (−) of UT.  Alternatively, a slash (/) separates standard
231            and daylight abbreviations.  To conform  to  POSIX,  a  time  zone
232            abbreviation  should  contain  only alphanumeric ASCII characters,
233            “+” and “-”.
234
235       UNTIL
236            The time at which the UT offset or the rule(s) change for a  loca‐
237            tion.  It takes the form of YEAR [MONTH [DAY [TIME]]].  If this is
238            specified, the time zone information is generated from  the  given
239            UT  offset  and  rule  change  until  the time specified, which is
240            interpreted using the rules in effect just before the  transition.
241            The  month,  day,  and time of day have the same format as the IN,
242            ON, and AT fields of a rule; trailing fields can be  omitted,  and
243            default to the earliest possible value for the missing fields.
244
245            The  next  line  must  be a “continuation” line; this has the same
246            form as a zone line except that the string “Zone” and the name are
247            omitted,  as the continuation line will place information starting
248            at the time specified as the “until” information in  the  previous
249            line  in  the  file used by the previous line.  Continuation lines
250            may contain “until” information, just as zone lines do, indicating
251            that the next line is a further continuation.
252
253       If  a zone changes at the same instant that a rule would otherwise take
254       effect in the earlier zone or continuation line, the rule  is  ignored.
255       In  a  single  zone it is an error if two rules take effect at the same
256       instant, or if two zone changes take effect at the same instant.
257
258       A link line has the form
259
260            Link  TARGET           LINK-NAME
261
262       For example:
263
264            Link  Europe/Istanbul  Asia/Istanbul
265
266       The TARGET field should appear as the NAME field  in  some  zone  line.
267       The  LINK-NAME  field  is used as an alternative name for that zone; it
268       has the same syntax as a zone line's NAME field.
269
270       Except for continuation lines, lines may appear in  any  order  in  the
271       input.   However,  the behavior is unspecified if multiple zone or link
272       lines define the same name, or if the source of one link  line  is  the
273       target of another.
274
275       Lines in the file that describes leap seconds have the following form:
276
277            Leap  YEAR  MONTH  DAY  HH:MM:SS  CORR  R/S
278
279       For example:
280
281            Leap  2016  Dec    31   23:59:60  +     S
282
283       The  YEAR,  MONTH,  DAY,  and HH:MM:SS fields tell when the leap second
284       happened.  The CORR field should be “+” if a second was added or “-” if
285       a  second  was  skipped.   The R/S field should be (an abbreviation of)
286       “Stationary” if the leap second time given by the other  fields  should
287       be  interpreted  as  UTC  or (an abbreviation of) “Rolling” if the leap
288       second time given by the other fields should be  interpreted  as  local
289       wall clock time.
290

EXTENDED EXAMPLE

292       Here  is  an extended example of zic input, intended to illustrate many
293       of its features.  In this example, the EU rules are  for  the  European
294       Union and for its predecessor organization, the European Communities.
295
296         # Rule  NAME  FROM  TO    TYPE  IN   ON       AT    SAVE  LETTER/S
297         Rule    Swiss 1941  1942  -     May  Mon>=1   1:00  1:00  S
298         Rule    Swiss 1941  1942  -     Oct  Mon>=1   2:00  0     -
299         Rule    EU    1977  1980  -     Apr  Sun>=1   1:00u 1:00  S
300         Rule    EU    1977  only  -     Sep  lastSun  1:00u 0     -
301         Rule    EU    1978  only  -     Oct   1       1:00u 0     -
302         Rule    EU    1979  1995  -     Sep  lastSun  1:00u 0     -
303         Rule    EU    1981  max   -     Mar  lastSun  1:00u 1:00  S
304         Rule    EU    1996  max   -     Oct  lastSun  1:00u 0     -
305
306         # Zone  NAME           UTOFF    RULES  FORMAT  [UNTIL]
307         Zone    Europe/Zurich  0:34:08  -      LMT     1853 Jul 16
308                                0:29:46  -      BMT     1894 Jun
309                                1:00     Swiss  CE%sT   1981
310                                1:00     EU     CE%sT
311
312         Link    Europe/Zurich  Europe/Vaduz
313
314       In  this  example,  the  timezone  is named Europe/Zurich but it has an
315       alias as Europe/Vaduz.  This example says that Zurich  was  34  minutes
316       and 8 seconds east of UT until 1853-07-16 at 00:00, when the legal off‐
317       set was changed to 7°26′22.50″; although this works out to  0:29:45.50,
318       the  input  format cannot represent fractional seconds so it is rounded
319       here.  After 1894-06-01 at 00:00 the UT  offset  became  one  hour  and
320       Swiss  daylight  saving  rules (defined with lines beginning with “Rule
321       Swiss”) apply.  From 1981 to the present, EU daylight saving rules have
322       applied, and the UTC offset has remained at one hour.
323
324       In 1941 and 1942, daylight saving time applied from the first Monday in
325       May at 01:00 to the first Monday in October at 02:00.  The pre-1981  EU
326       daylight-saving  rules  have  no effect here, but are included for com‐
327       pleteness.  Since 1981, daylight saving has begun on the last Sunday in
328       March  at  01:00 UTC.  Until 1995 it ended the last Sunday in September
329       at 01:00 UTC, but this changed to the last Sunday in  October  starting
330       in 1996.
331
332       For  purposes  of display, “LMT” and “BMT” were initially used, respec‐
333       tively.  Since Swiss rules and later EU rules were  applied,  the  time
334       zone  abbreviation has been CET for standard time and CEST for daylight
335       saving time.
336

FILES

338       /etc/localtime
339              Default local timezone file.
340
341       /usr/share/zoneinfo
342              Default timezone information directory.
343

NOTES

345       For areas with more than two types of local time, you may need  to  use
346       local  standard  time in the AT field of the earliest transition time's
347       rule to ensure that the earliest transition time recorded in  the  com‐
348       piled file is correct.
349
350       If,  for  a particular timezone, a clock advance caused by the start of
351       daylight saving coincides with and is equal to a clock  retreat  caused
352       by  a change in UT offset, zic produces a single transition to daylight
353       saving at the new UT offset (without any change in  wall  clock  time).
354       To get separate transitions use multiple zone continuation lines speci‐
355       fying transition instants using universal time.
356

SEE ALSO

358       tzfile(5), zdump(8)
359

COLOPHON

361       This page is part of release 5.02 of the Linux  man-pages  project.   A
362       description  of  the project, information about reporting bugs, and the
363       latest    version    of    this    page,    can     be     found     at
364       https://www.kernel.org/doc/man-pages/.
365
366
367
368                                  2019-03-06                            ZIC(8)
Impressum