Commit | Line | Data |
---|---|---|
d861d7ec WJ |
1 | .\" Copyright (c) 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" Arthur David Olson of the National Cancer Institute. | |
6 | .\" | |
7 | .\" Redistribution and use in source and binary forms, with or without | |
8 | .\" modification, are permitted provided that the following conditions | |
9 | .\" are met: | |
10 | .\" 1. Redistributions of source code must retain the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer. | |
12 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer in the | |
14 | .\" documentation and/or other materials provided with the distribution. | |
15 | .\" 3. All advertising materials mentioning features or use of this software | |
16 | .\" must display the following acknowledgement: | |
17 | .\" This product includes software developed by the University of | |
18 | .\" California, Berkeley and its contributors. | |
19 | .\" 4. Neither the name of the University nor the names of its contributors | |
20 | .\" may be used to endorse or promote products derived from this software | |
21 | .\" without specific prior written permission. | |
22 | .\" | |
23 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
24 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
25 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
26 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
27 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
28 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
29 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | .\" SUCH DAMAGE. | |
34 | .\" | |
35 | .\" @(#)zic.8 5.2 (Berkeley) 4/20/91 | |
36 | .\" | |
37 | .TH ZIC 8 | |
38 | .SH NAME | |
39 | zic \- time zone compiler | |
40 | .SH SYNOPSIS | |
41 | .B zic | |
42 | [ | |
43 | .B \-v | |
44 | ] [ | |
45 | .B \-d | |
46 | .I directory | |
47 | ] [ | |
48 | .B \-l | |
49 | .I localtime | |
50 | ] [ | |
51 | .B \-p | |
52 | .I posixrules | |
53 | ] [ | |
54 | .B \-L | |
55 | .I leapsecondfilename | |
56 | ] [ | |
57 | .B \-s | |
58 | ] [ | |
59 | .I filename | |
60 | \&... ] | |
61 | .SH DESCRIPTION | |
62 | .if t .ds lq `` | |
63 | .if t .ds rq '' | |
64 | .if n .ds lq \&"\" | |
65 | .if n .ds rq \&"\" | |
66 | .de q | |
67 | \\$3\*(lq\\$1\*(rq\\$2 | |
68 | .. | |
69 | .I Zic | |
70 | reads text from the file(s) named on the command line | |
71 | and creates the time conversion information files specified in this input. | |
72 | If a | |
73 | .I filename | |
74 | is | |
75 | .BR \- , | |
76 | the standard input is read. | |
77 | .PP | |
78 | These options are available: | |
79 | .TP | |
80 | .BI "\-d " directory | |
81 | Create time conversion information files in the named directory rather than | |
82 | in the standard directory named below. | |
83 | .TP | |
84 | .BI "\-l " timezone | |
85 | Use the given time zone as local time. | |
86 | .I Zic | |
87 | will act as if the input contained a link line of the form | |
88 | .sp | |
89 | .ti +.5i | |
90 | Link \fItimezone\fP localtime | |
91 | .TP | |
92 | .BI "\-p " timezone | |
93 | Use the given time zone's rules when handling POSIX-format | |
94 | time zone environment variables. | |
95 | .I Zic | |
96 | will act as if the input contained a link line of the form | |
97 | .sp | |
98 | .ti +.5i | |
99 | Link \fItimezone\fP posixrules | |
100 | .TP | |
101 | .BI "\-L " leapsecondfilename | |
102 | Read leap second information from the file with the given name. | |
103 | If this option is not used, | |
104 | no leap second information appears in output files. | |
105 | .TP | |
106 | .B \-v | |
107 | Complain if a year that appears in a data file is outside the range | |
108 | of years representable by | |
109 | .IR time (2) | |
110 | values. | |
111 | .TP | |
112 | .B \-s | |
113 | Limit time values stored in output files to values that are the same | |
114 | whether they're taken to be signed or unsigned. | |
115 | You can use this option to generate SVVS-compatible files. | |
116 | .sp | |
117 | Input lines are made up of fields. | |
118 | Fields are separated from one another by any number of white space characters. | |
119 | Leading and trailing white space on input lines is ignored. | |
120 | An unquoted sharp character (#) in the input introduces a comment which extends | |
121 | to the end of the line the sharp character appears on. | |
122 | White space characters and sharp characters may be enclosed in double quotes | |
123 | (") if they're to be used as part of a field. | |
124 | Any line that is blank (after comment stripping) is ignored. | |
125 | Non-blank lines are expected to be of one of three types: | |
126 | rule lines, zone lines, and link lines. | |
127 | .PP | |
128 | A rule line has the form | |
129 | .nf | |
130 | .B | |
131 | .ti +.5i | |
132 | .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 | |
133 | .sp | |
134 | Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S | |
135 | .sp | |
136 | For example: | |
137 | .ti +.5i | |
138 | .sp | |
139 | Rule USA 1969 1973 \- Apr lastSun 2:00 1:00 D | |
140 | .sp | |
141 | .fi | |
142 | The fields that make up a rule line are: | |
143 | .TP "\w'LETTER/S'u" | |
144 | .B NAME | |
145 | Gives the (arbitrary) name of the set of rules this rule is part of. | |
146 | .TP | |
147 | .B FROM | |
148 | Gives the first year in which the rule applies. | |
149 | The word | |
150 | .B minimum | |
151 | (or an abbreviation) means the minimum year with a representable time value. | |
152 | The word | |
153 | .B maximum | |
154 | (or an abbreviation) means the maximum year with a representable time value. | |
155 | .TP | |
156 | .B TO | |
157 | Gives the final year in which the rule applies. | |
158 | In addition to | |
159 | .B minimum | |
160 | and | |
161 | .B maximum | |
162 | (as above), | |
163 | the word | |
164 | .B only | |
165 | (or an abbreviation) | |
166 | may be used to repeat the value of the | |
167 | .B FROM | |
168 | field. | |
169 | .TP | |
170 | .B TYPE | |
171 | Gives the type of year in which the rule applies. | |
172 | If | |
173 | .B TYPE | |
174 | is | |
175 | .B \- | |
176 | then the rule applies in all years between | |
177 | .B FROM | |
178 | and | |
179 | .B TO | |
180 | inclusive; | |
181 | if | |
182 | .B TYPE | |
183 | is | |
184 | .BR uspres , | |
185 | the rule applies in U.S. Presidential election years; | |
186 | if | |
187 | .B TYPE | |
188 | is | |
189 | .BR nonpres , | |
190 | the rule applies in years other than U.S. Presidential election years. | |
191 | If | |
192 | .B TYPE | |
193 | is something else, then | |
194 | .I zic | |
195 | executes the command | |
196 | .ti +.5i | |
197 | \fByearistype\fP \fIyear\fP \fItype\fP | |
198 | .br | |
199 | to check the type of a year: | |
200 | an exit status of zero is taken to mean that the year is of the given type; | |
201 | an exit status of one is taken to mean that the year is not of the given type. | |
202 | .TP | |
203 | .B IN | |
204 | Names the month in which the rule takes effect. | |
205 | Month names may be abbreviated. | |
206 | .TP | |
207 | .B ON | |
208 | Gives the day on which the rule takes effect. | |
209 | Recognized forms include: | |
210 | .nf | |
211 | .in +.5i | |
212 | .sp | |
213 | .ta \w'Sun<=25\0\0'u | |
214 | 5 the fifth of the month | |
215 | lastSun the last Sunday in the month | |
216 | lastMon the last Monday in the month | |
217 | Sun>=8 first Sunday on or after the eighth | |
218 | Sun<=25 last Sunday on or before the 25th | |
219 | .fi | |
220 | .in -.5i | |
221 | .sp | |
222 | Names of days of the week may be abbreviated or spelled out in full. | |
223 | Note that there must be no spaces within the | |
224 | .B ON | |
225 | field. | |
226 | .TP | |
227 | .B AT | |
228 | Gives the time of day at which the rule takes effect. | |
229 | Recognized forms include: | |
230 | .nf | |
231 | .in +.5i | |
232 | .sp | |
233 | .ta \w'1:28:13\0\0'u | |
234 | 2 time in hours | |
235 | 2:00 time in hours and minutes | |
236 | 15:00 24-hour format time (for times after noon) | |
237 | 1:28:14 time in hours, minutes, and seconds | |
238 | .fi | |
239 | .in -.5i | |
240 | .sp | |
241 | Any of these forms may be followed by the letter | |
242 | .B w | |
243 | if the given time is local | |
244 | .q "wall clock" | |
245 | time or | |
246 | .B s | |
247 | if the given time is local | |
248 | .q standard | |
249 | time; in the absence of | |
250 | .B w | |
251 | or | |
252 | .BR s , | |
253 | wall clock time is assumed. | |
254 | .TP | |
255 | .B SAVE | |
256 | Gives the amount of time to be added to local standard time when the rule is in | |
257 | effect. | |
258 | This field has the same format as the | |
259 | .B AT | |
260 | field | |
261 | (although, of course, the | |
262 | .B w | |
263 | and | |
264 | .B s | |
265 | suffixes are not used). | |
266 | .TP | |
267 | .B LETTER/S | |
268 | Gives the | |
269 | .q "variable part" | |
270 | (for example, the | |
271 | .q S | |
272 | or | |
273 | .q D | |
274 | in | |
275 | .q EST | |
276 | or | |
277 | .q EDT ) | |
278 | of time zone abbreviations to be used when this rule is in effect. | |
279 | If this field is | |
280 | .BR \- , | |
281 | the variable part is null. | |
282 | .PP | |
283 | A zone line has the form | |
284 | .sp | |
285 | .nf | |
286 | .ti +.5i | |
287 | .ta \w'Zone\0\0'u +\w'Australia/South\-west\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u | |
288 | Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] | |
289 | .sp | |
290 | For example: | |
291 | .sp | |
292 | .ti +.5i | |
293 | Zone Australia/South\-west 9:30 Aus CST 1987 Mar 15 2:00 | |
294 | .sp | |
295 | .fi | |
296 | The fields that make up a zone line are: | |
297 | .TP "\w'GMTOFF'u" | |
298 | .B NAME | |
299 | The name of the time zone. | |
300 | This is the name used in creating the time conversion information file for the | |
301 | zone. | |
302 | .TP | |
303 | .B GMTOFF | |
304 | The amount of time to add to GMT to get standard time in this zone. | |
305 | This field has the same format as the | |
306 | .B AT | |
307 | and | |
308 | .B SAVE | |
309 | fields of rule lines; | |
310 | begin the field with a minus sign if time must be subtracted from GMT. | |
311 | .TP | |
312 | .B RULES/SAVE | |
313 | The name of the rule(s) that apply in the time zone or, | |
314 | alternately, an amount of time to add to local standard time. | |
315 | If this field is | |
316 | .B \- | |
317 | then standard time always applies in the time zone. | |
318 | .TP | |
319 | .B FORMAT | |
320 | The format for time zone abbreviations in this time zone. | |
321 | The pair of characters | |
322 | .B %s | |
323 | is used to show where the | |
324 | .q "variable part" | |
325 | of the time zone abbreviation goes. | |
326 | .TP | |
327 | .B UNTIL | |
328 | The time at which the GMT offset or the rule(s) change for a location. | |
329 | It is specified as a year, a month, a day, and a time of day. | |
330 | If this is specified, | |
331 | the time zone information is generated from the given GMT offset | |
332 | and rule change until the time specified. | |
333 | .IP | |
334 | The next line must be a | |
335 | .q continuation | |
336 | line; this has the same form as a zone line except that the | |
337 | string | |
338 | .q Zone | |
339 | and the name are omitted, as the continuation line will | |
340 | place information starting at the time specified as the | |
341 | .B UNTIL | |
342 | field in the previous line in the file used by the previous line. | |
343 | Continuation lines may contain an | |
344 | .B UNTIL | |
345 | field, just as zone lines do, indicating that the next line is a further | |
346 | continuation. | |
347 | .PP | |
348 | A link line has the form | |
349 | .sp | |
350 | .nf | |
351 | .ti +.5i | |
352 | .if t .ta \w'Link\0\0'u +\w'LINK-FROM\0\0'u | |
353 | .if n .ta \w'Link\0\0'u +\w'US/Eastern\0\0'u | |
354 | Link LINK-FROM LINK-TO | |
355 | .sp | |
356 | For example: | |
357 | .sp | |
358 | .ti +.5i | |
359 | Link US/Eastern EST5EDT | |
360 | .sp | |
361 | .fi | |
362 | The | |
363 | .B LINK-FROM | |
364 | field should appear as the | |
365 | .B NAME | |
366 | field in some zone line; | |
367 | the | |
368 | .B LINK-TO | |
369 | field is used as an alternate name for that zone. | |
370 | .PP | |
371 | Except for continuation lines, | |
372 | lines may appear in any order in the input. | |
373 | .PP | |
374 | Lines in the file that describes leap seconds have the following form: | |
375 | .nf | |
376 | .B | |
377 | .ti +.5i | |
378 | .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 | |
379 | Leap YEAR MONTH DAY HH:MM:SS CORR R/S | |
380 | .sp | |
381 | For example: | |
382 | .ti +.5i | |
383 | .sp | |
384 | Leap 1974 Dec 31 23:59:60 + S | |
385 | .sp | |
386 | .fi | |
387 | The | |
388 | .BR YEAR , | |
389 | .BR MONTH , | |
390 | .BR DAY , | |
391 | and | |
392 | .B HH:MM:SS | |
393 | fields tell when the leap second happened. | |
394 | The | |
395 | .B CORR | |
396 | field | |
397 | should be | |
398 | .q + | |
399 | if a second was added | |
400 | or | |
401 | .q - | |
402 | if a second was skipped. | |
403 | The | |
404 | .B R/S | |
405 | field | |
406 | should be (an abbreviation of) | |
407 | .q Stationary | |
408 | if the leap second time given by the other fields should be interpreted as GMT | |
409 | or | |
410 | (an abbreviation of) | |
411 | .q Rolling | |
412 | if the leap second time given by the other fields should be interpreted as | |
413 | local wall clock time. | |
414 | .SH NOTE | |
415 | For areas with more than two types of local time, | |
416 | you may need to use local standard time in the | |
417 | .B AT | |
418 | field of the earliest transition time's rule to ensure that | |
419 | the earliest transition time recorded in the compiled file is correct. | |
420 | .SH FILE | |
421 | /etc/zoneinfo standard directory used for created files | |
422 | .SH "SEE ALSO" | |
423 | newctime(3), tzfile(5), zdump(8) | |
424 | .. @(#)zic.8 4.4 |