"Fossies" - the Fresh Open Source Software Archive
Member "zic.8.txt" (22 Oct 2018, 18936 Bytes) of package /linux/misc/tzcode2018i.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard
) with prefixed line numbers.
Alternatively you can here view
the uninterpreted source code file.
See also the last Fossies "Diffs"
side-by-side code changes report for "zic.8.txt": 2018f_vs_2018g
1 ZIC(8) System Manager's Manual ZIC(8)
4 zic - timezone compiler
7 zic [ option ... ] [ filename ... ]
10 The zic program reads text from the file(s) named on the command line
11 and creates the time conversion information files specified in this
12 input. If a filename is "-", standard input is read.
16 Output version information and exit.
18 --help Output short usage message and exit.
20 -d directory
21 Create time conversion information files in the named directory
22 rather than in the standard directory named below.
24 -l timezone
25 Use timezone as local time. zic will act as if the input
26 contained a link line of the form
28 Link timezone localtime
30 -p timezone
31 Use timezone's rules when handling POSIX-format timezone
32 environment variables. zic will act as if the input contained a
33 link line of the form
35 Link timezone posixrules
37 -t file
38 When creating local time information, put the configuration link
39 in the named file rather than in the standard location.
41 -L leapsecondfilename
42 Read leap second information from the file with the given name.
43 If this option is not used, no leap second information appears
44 in output files.
46 -v Be more verbose, and complain about the following situations:
48 The input specifies a link to a link.
50 A year that appears in a data file is outside the range of years
51 representable by time(2) values.
53 A time of 24:00 or more appears in the input. Pre-1998 versions
54 of zic prohibit 24:00, and pre-2007 versions prohibit times
55 greater than 24:00.
57 A rule goes past the start or end of the month. Pre-2004
58 versions of zic prohibit this.
60 The output file does not contain all the information about the
61 long-term future of a timezone, because the future cannot be
62 summarized as an extended POSIX TZ string. For example, as of
63 2013 this problem occurs for Iran's daylight-saving rules for
64 the predicted future, as these rules are based on the Iranian
65 calendar, which cannot be represented.
67 The output contains data that may not be handled properly by
68 client code designed for older zic output formats. These
69 compatibility issues affect only timestamps before 1970 or after
70 the start of 2038.
72 A time zone abbreviation has fewer than 3 characters. POSIX
73 requires at least 3.
75 An output file name contains a byte that is not an ASCII letter,
76 "-", "/", or "_"; or it contains a file name component that
77 contains more than 14 bytes or that starts with "-".
79 -s Limit time values stored in output files to values that are the
80 same whether they're taken to be signed or unsigned. You can
81 use this option to generate SVVS-compatible files.
83 Input files should be text files, that is, they should be a series of
84 zero or more lines, each ending in a newline byte and containing at
85 most 511 bytes, and without any NUL bytes. The input text's encoding
86 is typically UTF-8 or ASCII; it should have a unibyte representation
87 for the POSIX Portable Character Set (PPCS) <http://pubs.opengroup.org/
88 onlinepubs/9699919799/basedefs/V1_chap06.html> and the encoding's non-
89 unibyte characters should consist entirely of non-PPCS bytes. Non-PPCS
90 characters typically occur only in comments: although output file names
91 and time zone abbreviations can contain nearly any character, other
92 software will work better if these are limited to the restricted syntax
93 described under the -v option.
95 Input lines are made up of fields. Fields are separated from one
96 another by one or more white space characters. The white space
97 characters are space, form feed, carriage return, newline, tab, and
98 vertical tab. Leading and trailing white space on input lines is
99 ignored. An unquoted sharp character (#) in the input introduces a
100 comment which extends to the end of the line the sharp character
101 appears on. White space characters and sharp characters may be
102 enclosed in double quotes (") if they're to be used as part of a field.
103 Any line that is blank (after comment stripping) is ignored. Nonblank
104 lines are expected to be of one of three types: rule lines, zone lines,
105 and link lines.
107 Names must be in English and are case insensitive. They appear in
108 several contexts, and include month and weekday names and keywords such
109 as maximum, only, Rolling, and Zone. A name can be abbreviated by
110 omitting all but an initial prefix; any abbreviation must be
111 unambiguous in context.
113 A rule line has the form
115 Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
117 For example:
119 Rule US 1967 1973 - Apr lastSun 2:00w 1:00d D
121 The fields that make up a rule line are:
123 NAME Gives the name of the rule set that contains this line. The
124 name must start with a character that is neither an ASCII digit
125 nor "-" nor "+". To allow for future extensions, an unquoted
126 name should not contain characters from the set
129 FROM Gives the first year in which the rule applies. Any signed
130 integer year can be supplied; the proleptic Gregorian calendar
131 is assumed, with year 0 preceding year 1. The word minimum (or
132 an abbreviation) means the indefinite past. The word maximum
133 (or an abbreviation) means the indefinite future. Rules can
134 describe times that are not representable as time values, with
135 the unrepresentable times ignored; this allows rules to be
136 portable among hosts with differing time value types.
138 TO Gives the final year in which the rule applies. In addition to
139 minimum and maximum (as above), the word only (or an
140 abbreviation) may be used to repeat the value of the FROM
143 TYPE should be "-" and is present for compatibility with older
144 versions of zic in which it could contain year types.
146 IN Names the month in which the rule takes effect. Month names
147 may be abbreviated.
149 ON Gives the day on which the rule takes effect. Recognized forms
152 5 the fifth of the month
153 lastSun the last Sunday in the month
154 lastMon the last Monday in the month
155 Sun>=8 first Sunday on or after the eighth
156 Sun<=25 last Sunday on or before the 25th
158 A weekday name (e.g., Sunday) or a weekday name preceded by
159 "last" (e.g., lastSunday) may be abbreviated or spelled out in
160 full. Note that there must be no spaces within the ON field.
162 AT Gives the time of day at which the rule takes effect, relative
163 to 00:00, the start of a calendar day. Recognized forms
166 2 time in hours
167 2:00 time in hours and minutes
168 01:28:14 time in hours, minutes, and seconds
169 00:19:32.13 time with fractional seconds
170 12:00 midday, 12 hours after 00:00
171 15:00 3 PM, 15 hours after 00:00
172 24:00 end of day, 24 hours after 00:00
173 260:00 260 hours after 00:00
174 -2:30 2.5 hours before 00:00
175 - equivalent to 0
177 Although zic rounds times to the nearest integer second
178 (breaking ties to the even integer), the fractions may be
179 useful to other applications requiring greater precision. The
180 source format does not specify any maximum precision. Any of
181 these forms may be followed by the letter w if the given time
182 is local "wall clock" time, s if the given time is local
183 "standard" time, or u (or g or z) if the given time is
184 universal time; in the absence of an indicator, wall clock time
185 is assumed. These forms ignore leap seconds; for example, if a
186 leap second occurs at 00:59:60 local time, "1:00" stands for
187 3601 seconds after local midnight instead of the usual 3600
188 seconds. The intent is that a rule line describes the instants
189 when a clock/calendar set to the type of time specified in the
190 AT field would show the specified date and time of day.
192 SAVE Gives the amount of time to be added to local standard time
193 when the rule is in effect, and whether the resulting time is
194 standard or daylight saving. This field has the same format as
195 the AT field except with a different set of suffix letters: s
196 for standard time and d for daylight saving time. The suffix
197 letter is typically omitted, and defaults to s if the offset is
198 zero and to d otherwise. Negative offsets are allowed; in
199 Ireland, for example, daylight saving time is observed in
200 winter and has a negative offset relative to Irish Standard
201 Time. The offset is merely added to standard time; for
202 example, zic does not distinguish a 10:30 standard time plus an
203 0:30 SAVE from a 10:00 standard time plus a 1:00 SAVE.
206 Gives the "variable part" (for example, the "S" or "D" in "EST"
207 or "EDT") of time zone abbreviations to be used when this rule
208 is in effect. If this field is "-", the variable part is null.
210 A zone line has the form
212 Zone NAME UTOFF RULES FORMAT [UNTIL]
214 For example:
216 Zone Asia/Amman 2:00 Jordan EE%sT 2017 Oct 27 01:00
218 The fields that make up a zone line are:
220 NAME The name of the timezone. This is the name used in creating the
221 time conversion information file for the timezone. It should not
222 contain a file name component "." or ".."; a file name component
223 is a maximal substring that does not contain "/".
226 The amount of time to add to UT to get standard time. This field
227 has the same format as the AT and SAVE fields of rule lines; begin
228 the field with a minus sign if time must be subtracted from UT.
231 The name of the rules that apply in the timezone or,
232 alternatively, a field in the same format as a rule-line SAVE
233 column, giving of the amount of time to be added to local standard
234 time effect, and whether the resulting time is standard or
235 daylight saving. If this field is - then standard time always
236 applies. When an amount of time is given, only the sum of
237 standard time and this amount matters.
240 The format for time zone abbreviations. The pair of characters %s
241 is used to show where the "variable part" of the time zone
242 abbreviation goes. Alternatively, a format can use the pair of
243 characters %z to stand for the UT offset in the form +-hh, +-hhmm,
244 or +-hhmmss, using the shortest form that does not lose
245 information, where hh, mm, and ss are the hours, minutes, and
246 seconds east (+) or west (-) of UT. Alternatively, a slash (/)
247 separates standard and daylight abbreviations. To conform to
248 POSIX, a time zone abbreviation should contain only alphanumeric
249 ASCII characters, "+" and "-".
252 The time at which the UT offset or the rule(s) change for a
253 location. It takes the form of YEAR [MONTH [DAY [TIME]]]. If
254 this is specified, the time zone information is generated from the
255 given UT offset and rule change until the time specified, which is
256 interpreted using the rules in effect just before the transition.
257 The month, day, and time of day have the same format as the IN,
258 ON, and AT fields of a rule; trailing fields can be omitted, and
259 default to the earliest possible value for the missing fields.
261 The next line must be a "continuation" line; this has the same
262 form as a zone line except that the string "Zone" and the name are
263 omitted, as the continuation line will place information starting
264 at the time specified as the "until" information in the previous
265 line in the file used by the previous line. Continuation lines
266 may contain "until" information, just as zone lines do, indicating
267 that the next line is a further continuation.
269 If a zone changes at the same instant that a rule would otherwise take
270 effect in the earlier zone or continuation line, the rule is ignored.
271 In a single zone it is an error if two rules take effect at the same
272 instant, or if two zone changes take effect at the same instant.
274 A link line has the form
276 Link TARGET LINK-NAME
278 For example:
280 Link Europe/Istanbul Asia/Istanbul
282 The TARGET field should appear as the NAME field in some zone line.
283 The LINK-NAME field is used as an alternative name for that zone; it
284 has the same syntax as a zone line's NAME field.
286 Except for continuation lines, lines may appear in any order in the
287 input. However, the behavior is unspecified if multiple zone or link
288 lines define the same name, or if the source of one link line is the
289 target of another.
291 Lines in the file that describes leap seconds have the following form:
293 Leap YEAR MONTH DAY HH:MM:SS CORR R/S
295 For example:
297 Leap 2016 Dec 31 23:59:60 + S
299 The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap second
300 happened. The CORR field should be "+" if a second was added or "-" if
301 a second was skipped. The R/S field should be (an abbreviation of)
302 "Stationary" if the leap second time given by the other fields should
303 be interpreted as UTC or (an abbreviation of) "Rolling" if the leap
304 second time given by the other fields should be interpreted as local
305 wall clock time.
307 EXTENDED EXAMPLE
308 Here is an extended example of zic input, intended to illustrate many
309 of its features. In this example, the EU rules are for the European
310 Union and for its predecessor organization, the European Communities.
312 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
313 Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S
314 Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 -
315 Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
316 Rule EU 1977 only - Sep lastSun 1:00u 0 -
317 Rule EU 1978 only - Oct 1 1:00u 0 -
318 Rule EU 1979 1995 - Sep lastSun 1:00u 0 -
319 Rule EU 1981 max - Mar lastSun 1:00u 1:00 S
320 Rule EU 1996 max - Oct lastSun 1:00u 0 -
322 # Zone NAME UTOFF RULES FORMAT [UNTIL]
323 Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16
324 0:29:46 - BMT 1894 Jun
325 1:00 Swiss CE%sT 1981
326 1:00 EU CE%sT
328 Link Europe/Zurich Europe/Vaduz
330 In this example, the timezone is named Europe/Zurich but it has an
331 alias as Europe/Vaduz. This example says that Zurich was 34 minutes
332 and 8 seconds east of UT until 1853-07-16 at 00:00, when the legal
333 offset was changed to 7o26'22.50''; although this works out to
334 0:29:45.50, the input format cannot represent fractional seconds so it
335 is rounded here. After 1894-06-01 at 00:00 the UT offset became one
336 hour and Swiss daylight saving rules (defined with lines beginning with
337 "Rule Swiss") apply. From 1981 to the present, EU daylight saving
338 rules have applied, and the UTC offset has remained at one hour.
340 In 1941 and 1942, daylight saving time applied from the first Monday in
341 May at 01:00 to the first Monday in October at 02:00. The pre-1981 EU
342 daylight-saving rules have no effect here, but are included for
343 completeness. Since 1981, daylight saving has begun on the last Sunday
344 in March at 01:00 UTC. Until 1995 it ended the last Sunday in
345 September at 01:00 UTC, but this changed to the last Sunday in October
346 starting in 1996.
348 For purposes of display, "LMT" and "BMT" were initially used,
349 respectively. Since Swiss rules and later EU rules were applied, the
350 time zone abbreviation has been CET for standard time and CEST for
351 daylight saving time.
355 Default local timezone file.
358 Default timezone information directory.
361 For areas with more than two types of local time, you may need to use
362 local standard time in the AT field of the earliest transition time's
363 rule to ensure that the earliest transition time recorded in the
364 compiled file is correct.
366 If, for a particular timezone, a clock advance caused by the start of
367 daylight saving coincides with and is equal to a clock retreat caused
368 by a change in UT offset, zic produces a single transition to daylight
369 saving at the new UT offset (without any change in wall clock time).
370 To get separate transitions use multiple zone continuation lines
371 specifying transition instants using universal time.
373 SEE ALSO
374 tzfile(5), zdump(8)