zic - timezone compiler
zic [ option
... ] [ filename
...
]
The zic program reads text from the file(s) named on
the command line and creates the time conversion information files
specified in this input. If a filename
is “”, standard input is
read.
Output version information and exit.
Output short usage message and exit.
bloat
Output backward-compatibility data as specified by bloat
. If
bloat
is fat, generate additional data entries
that work around potential bugs or incompatibilities in older software,
such as software that mishandles the 64-bit generated data. If
bloat
is slim, keep the output files small;
this can help check for the bugs and incompatibilities. Although the
default is currently fat, this is intended to change in
future zic versions, as software that mishandles the
64-bit data typically mishandles timestamps after the year 2038 anyway.
Also see the r option for another way to shrink output
size.
directory
Create time conversion information files in the named directory rather than in the standard directory named below.
timezone
Use timezone
as local time. zic will act as
if the input contained a link line of the form
Link timezone
localtime
leapsecondfilename
Read leap second information from the file with the given name. If this option is not used, no leap second information appears in output files.
timezone
Use timezone
's rules when handling nonstandard TZ strings
like "EET2EEST" that lack transition rules. zic will
act as if the input contained a link line of the form
Link timezone
posixrules
This feature is obsolete and poorly supported. Among other things it
should not be used for timestamps after the year 2037, and it should not
be combined with b slim if timezone
's
transitions are at standard time or Universal Time (UT) instead of local
time.
lo
][/@hi
]Reduce the size of output files by limiting their applicability to
timestamps in the range from lo
(inclusive) to hi
(exclusive), where lo
and hi
are possibly-signed
decimal counts of seconds since the Epoch (1970-01-01 00:00:00 UTC).
Omitted counts default to extreme values. For example, “zic r @0” omits
data intended for negative timestamps (i.e., before the Epoch), and “zic
r @0/@2147483648” outputs data intended only for nonnegative timestamps
that fit into 31-bit signed integers. On platforms with GNU
date, “zic -r @$(date +%s)” omits data intended for
past timestamps. Also see the b slim option for another
way to shrink output size.
file
When creating local time information, put the configuration link in the named file rather than in the standard location.
Be more verbose, and complain about the following situations:
The input specifies a link to a link.
A year that appears in a data file is outside the range of representable years.
A time of 24:00 or more appears in the input. Pre-1998 versions of zic prohibit 24:00, and pre-2007 versions prohibit times greater than 24:00.
A rule goes past the start or end of the month. Pre-2004 versions of zic prohibit this.
A time zone abbreviation uses a %z format. Pre-2015 versions of zic do not support this.
A timestamp contains fractional seconds. Pre-2018 versions of zic do not support this.
The input contains abbreviations that are mishandled by pre-2018 versions of zic due to a longstanding coding bug. These abbreviations include “L” for “Link”, “mi” for “min”, “Sa” for “Sat”, and “Su” for “Sun”.
The output file does not contain all the information about the long-term future of a timezone, because the future cannot be summarized as an extended POSIX TZ string. For example, as of 2019 this problem occurs for Iran's daylight-saving rules for the predicted future, as these rules are based on the Iranian calendar, which cannot be represented.
The output contains data that may not be handled properly by client code designed for older zic output formats. These compatibility issues affect only timestamps before 1970 or after the start of 2038.
The output file contains more than 1200 transitions, which may be mishandled by some clients. The current reference client supports at most 2000 transitions; pre-2014 versions of the reference client support at most 1200 transitions.
A time zone abbreviation has fewer than 3 or more than 6 characters. POSIX requires at least 3, and requires implementations to support at least 6.
An output file name contains a byte that is not an ASCII letter, “”, “/”, or “_”; or it contains a file name component that contains more than 14 bytes or that starts with “”.
/etc/localtime
Default local timezone file.
/usr/share/zoneinfo
Default timezone information directory.
Here is an extended example of zic input, intended
to illustrate many of its features. In this example, the EU rules are
for the European Union and for its predecessor organization, the
European Communities.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Swiss 1941 1942 May Mon>=1 1:00 1:00 S
Rule Swiss 1941 1942 Oct Mon>=1 2:00 0
Rule EU 1977 1980 Apr Sun>=1 1:00u 1:00 S
Rule EU 1977 only Sep lastSun 1:00u 0
Rule EU 1978 only Oct 1 1:00u 0
Rule EU 1979 1995 Sep lastSun 1:00u 0
Rule EU 1981 max Mar lastSun 1:00u 1:00 S
Rule EU 1996 max Oct lastSun 1:00u 0
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Europe/Zurich 0:34:08 LMT 1853 Jul 16
0:29:45.50 BMT 1894 Jun
1:00 Swiss CE%sT 1981
1:00 EU CE%sT
Link Europe/Zurich Europe/Vaduz
In this example, the timezone is named Europe/Zurich but it has an alias as Europe/Vaduz. This example says that Zurich was 34 minutes and 8 seconds east of UT until 1853-07-16 at 00:00, when the legal offset was changed to 7 degrees 26 minutes 22.50 seconds, which works out to 0:29:45.50; zic treats this by rounding it to 0:29:46. After 1894-06-01 at 00:00 the UT offset became one hour and Swiss daylight saving rules (defined with lines beginning with “Rule Swiss”) apply. From 1981 to the present, EU daylight saving rules have applied, and the UTC offset has remained at one hour.
In 1941 and 1942, daylight saving time applied from the first Monday in May at 01:00 to the first Monday in October at 02:00. The pre-1981 EU daylight-saving rules have no effect here, but are included for completeness. Since 1981, daylight saving has begun on the last Sunday in March at 01:00 UTC. Until 1995 it ended the last Sunday in September at 01:00 UTC, but this changed to the last Sunday in October starting in 1996.
For purposes of display, “LMT” and “BMT” were initially used, respectively. Since Swiss rules and later EU rules were applied, the time zone abbreviation has been CET for standard time and CEST for daylight saving time.
For areas with more than two types of local time, you may need to use local standard time in the AT field of the earliest transition time's rule to ensure that the earliest transition time recorded in the compiled file is correct.
If, for a particular timezone, a clock advance caused by the start of daylight saving coincides with and is equal to a clock retreat caused by a change in UT offset, zic produces a single transition to daylight saving at the new UT offset without any change in local (wall clock) time. To get separate transitions use multiple zone continuation lines specifying transition instants using universal time.
This page is part of release 5.10 of the Linux man-pages
project. A description of the project, information about reporting bugs,
and the latest version of this page, can be found at
https://www.kernel.org/doc/man-pages/.