]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | .\" $OpenBSD: zic.8,v 1.4 1997/01/14 03:16:57 millert Exp $ |
2 | .TH ZIC 8 | |
3 | .SH NAME | |
4 | zic \- time zone compiler | |
5 | .SH SYNOPSIS | |
6 | .B zic | |
7 | [ | |
8 | .B \-v | |
9 | ] [ | |
10 | .B \-d | |
11 | .I directory | |
12 | ] [ | |
13 | .B \-l | |
14 | .I localtime | |
15 | ] [ | |
16 | .B \-p | |
17 | .I posixrules | |
18 | ] [ | |
19 | .B \-L | |
20 | .I leapsecondfilename | |
21 | ] [ | |
22 | .B \-s | |
23 | ] [ | |
24 | .B \-y | |
25 | .I command | |
26 | ] [ | |
27 | .I filename | |
28 | \&... ] | |
29 | .SH DESCRIPTION | |
30 | .if t .ds lq `` | |
31 | .if t .ds rq '' | |
32 | .if n .ds lq \&"\" | |
33 | .if n .ds rq \&"\" | |
34 | .de q | |
35 | \\$3\*(lq\\$1\*(rq\\$2 | |
36 | .. | |
37 | .I Zic | |
38 | reads text from the file(s) named on the command line | |
39 | and creates the time conversion information files specified in this input. | |
40 | If a | |
41 | .I filename | |
42 | is | |
43 | .BR \- , | |
44 | the standard input is read. | |
45 | .PP | |
46 | These options are available: | |
47 | .TP | |
48 | .BI "\-d " directory | |
49 | Create time conversion information files in the named directory rather than | |
50 | in the standard directory named below. | |
51 | .TP | |
52 | .BI "\-l " timezone | |
53 | Use the given time zone as local time. | |
54 | .I Zic | |
55 | will act as if the input contained a link line of the form | |
56 | .sp | |
57 | .ti +.5i | |
58 | Link \fItimezone\fP localtime | |
59 | .TP | |
60 | .BI "\-p " timezone | |
61 | Use the given time zone's rules when handling POSIX-format | |
62 | time zone environment variables. | |
63 | .I Zic | |
64 | will act as if the input contained a link line of the form | |
65 | .sp | |
66 | .ti +.5i | |
67 | Link \fItimezone\fP posixrules | |
68 | .TP | |
69 | .BI "\-L " leapsecondfilename | |
70 | Read leap second information from the file with the given name. | |
71 | If this option is not used, | |
72 | no leap second information appears in output files. | |
73 | .TP | |
74 | .B \-v | |
75 | Complain if a year that appears in a data file is outside the range | |
76 | of years representable by | |
77 | .IR time (3) | |
78 | values. | |
79 | .TP | |
80 | .B \-s | |
81 | Limit time values stored in output files to values that are the same | |
82 | whether they're taken to be signed or unsigned. | |
83 | You can use this option to generate SVVS-compatible files. | |
84 | .TP | |
85 | .BI "\-y " command | |
86 | Use the given | |
87 | .I command | |
88 | rather than | |
89 | .B yearistype | |
90 | when checking year types (see below). | |
91 | .PP | |
92 | Input lines are made up of fields. | |
93 | Fields are separated from one another by any number of white space characters. | |
94 | Leading and trailing white space on input lines is ignored. | |
95 | An unquoted sharp character (#) in the input introduces a comment which extends | |
96 | to the end of the line the sharp character appears on. | |
97 | White space characters and sharp characters may be enclosed in double quotes | |
98 | (") if they're to be used as part of a field. | |
99 | Any line that is blank (after comment stripping) is ignored. | |
100 | Non-blank lines are expected to be of one of three types: | |
101 | rule lines, zone lines, and link lines. | |
102 | .PP | |
103 | A rule line has the form | |
104 | .nf | |
105 | .ti +.5i | |
106 | .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 | |
107 | .sp | |
108 | Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S | |
109 | .sp | |
110 | For example: | |
111 | .ti +.5i | |
112 | .sp | |
113 | Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D | |
114 | .sp | |
115 | .fi | |
116 | The fields that make up a rule line are: | |
117 | .TP "\w'LETTER/S'u" | |
118 | .B NAME | |
119 | Gives the (arbitrary) name of the set of rules this rule is part of. | |
120 | .TP | |
121 | .B FROM | |
122 | Gives the first year in which the rule applies. | |
123 | Any integer year can be supplied; the Gregorian calendar is assumed. | |
124 | The word | |
125 | .B minimum | |
126 | (or an abbreviation) means the minimum year representable as an integer. | |
127 | The word | |
128 | .B maximum | |
129 | (or an abbreviation) means the maximum year representable as an integer. | |
130 | Rules can describe times that are not representable as time values, | |
131 | with the unrepresentable times ignored; this allows rules to be portable | |
132 | among hosts with differing time value types. | |
133 | .TP | |
134 | .B TO | |
135 | Gives the final year in which the rule applies. | |
136 | In addition to | |
137 | .B minimum | |
138 | and | |
139 | .B maximum | |
140 | (as above), | |
141 | the word | |
142 | .B only | |
143 | (or an abbreviation) | |
144 | may be used to repeat the value of the | |
145 | .B FROM | |
146 | field. | |
147 | .TP | |
148 | .B TYPE | |
149 | Gives the type of year in which the rule applies. | |
150 | If | |
151 | .B TYPE | |
152 | is | |
153 | .B \- | |
154 | then the rule applies in all years between | |
155 | .B FROM | |
156 | and | |
157 | .B TO | |
158 | inclusive. | |
159 | If | |
160 | .B TYPE | |
161 | is something else, then | |
162 | .I zic | |
163 | executes the command | |
164 | .ti +.5i | |
165 | \fByearistype\fP \fIyear\fP \fItype\fP | |
166 | .br | |
167 | to check the type of a year: | |
168 | an exit status of zero is taken to mean that the year is of the given type; | |
169 | an exit status of one is taken to mean that the year is not of the given type. | |
170 | .TP | |
171 | .B IN | |
172 | Names the month in which the rule takes effect. | |
173 | Month names may be abbreviated. | |
174 | .TP | |
175 | .B ON | |
176 | Gives the day on which the rule takes effect. | |
177 | Recognized forms include: | |
178 | .nf | |
179 | .in +.5i | |
180 | .sp | |
181 | .ta \w'Sun<=25\0\0'u | |
182 | 5 the fifth of the month | |
183 | lastSun the last Sunday in the month | |
184 | lastMon the last Monday in the month | |
185 | Sun>=8 first Sunday on or after the eighth | |
186 | Sun<=25 last Sunday on or before the 25th | |
187 | .fi | |
188 | .in -.5i | |
189 | .sp | |
190 | Names of days of the week may be abbreviated or spelled out in full. | |
191 | Note that there must be no spaces within the | |
192 | .B ON | |
193 | field. | |
194 | .TP | |
195 | .B AT | |
196 | Gives the time of day at which the rule takes effect. | |
197 | Recognized forms include: | |
198 | .nf | |
199 | .in +.5i | |
200 | .sp | |
201 | .ta \w'1:28:13\0\0'u | |
202 | 2 time in hours | |
203 | 2:00 time in hours and minutes | |
204 | 15:00 24-hour format time (for times after noon) | |
205 | 1:28:14 time in hours, minutes, and seconds | |
206 | .fi | |
207 | .in -.5i | |
208 | .sp | |
209 | Any of these forms may be followed by the letter | |
210 | .B w | |
211 | if the given time is local | |
212 | .q "wall clock" | |
213 | time, | |
214 | .B s | |
215 | if the given time is local | |
216 | .q standard | |
217 | time, or | |
218 | .B u | |
219 | (or | |
220 | .B g | |
221 | or | |
222 | .BR z ) | |
223 | if the given time is universal time; | |
224 | in the absence of an indicator, | |
225 | wall clock time is assumed. | |
226 | .TP | |
227 | .B SAVE | |
228 | Gives the amount of time to be added to local standard time when the rule is in | |
229 | effect. | |
230 | This field has the same format as the | |
231 | .B AT | |
232 | field | |
233 | (although, of course, the | |
234 | .B w | |
235 | and | |
236 | .B s | |
237 | suffixes are not used). | |
238 | .TP | |
239 | .B LETTER/S | |
240 | Gives the | |
241 | .q "variable part" | |
242 | (for example, the | |
243 | .q S | |
244 | or | |
245 | .q D | |
246 | in | |
247 | .q EST | |
248 | or | |
249 | .q EDT ) | |
250 | of time zone abbreviations to be used when this rule is in effect. | |
251 | If this field is | |
252 | .BR \- , | |
253 | the variable part is null. | |
254 | .PP | |
255 | A zone line has the form | |
256 | .sp | |
257 | .nf | |
258 | .ti +.5i | |
259 | .ta \w'Zone\0\0'u +\w'Australia/Adelaide\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u | |
260 | Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] | |
261 | .sp | |
262 | For example: | |
263 | .sp | |
264 | .ti +.5i | |
265 | Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 | |
266 | .sp | |
267 | .fi | |
268 | The fields that make up a zone line are: | |
269 | .TP "\w'GMTOFF'u" | |
270 | .B NAME | |
271 | The name of the time zone. | |
272 | This is the name used in creating the time conversion information file for the | |
273 | zone. | |
274 | .TP | |
275 | .B GMTOFF | |
276 | The amount of time to add to GMT to get standard time in this zone. | |
277 | This field has the same format as the | |
278 | .B AT | |
279 | and | |
280 | .B SAVE | |
281 | fields of rule lines; | |
282 | begin the field with a minus sign if time must be subtracted from GMT. | |
283 | .TP | |
284 | .B RULES/SAVE | |
285 | The name of the rule(s) that apply in the time zone or, | |
286 | alternately, an amount of time to add to local standard time. | |
287 | If this field is | |
288 | .B \- | |
289 | then standard time always applies in the time zone. | |
290 | .TP | |
291 | .B FORMAT | |
292 | The format for time zone abbreviations in this time zone. | |
293 | The pair of characters | |
294 | .B %s | |
295 | is used to show where the | |
296 | .q "variable part" | |
297 | of the time zone abbreviation goes. | |
298 | Alternately, | |
299 | a slash (/) | |
300 | separates standard and daylight abbreviations. | |
301 | .TP | |
302 | .B UNTIL | |
303 | The time at which the GMT offset or the rule(s) change for a location. | |
304 | It is specified as a year, a month, a day, and a time of day. | |
305 | If this is specified, | |
306 | the time zone information is generated from the given GMT offset | |
307 | and rule change until the time specified. | |
308 | The month, day, and time of day have the same format as the IN, ON, and AT | |
309 | columns of a rule; trailing columns can be omitted, and default to the | |
310 | earliest possible value for the missing columns. | |
311 | .IP | |
312 | The next line must be a | |
313 | .q continuation | |
314 | line; this has the same form as a zone line except that the | |
315 | string | |
316 | .q Zone | |
317 | and the name are omitted, as the continuation line will | |
318 | place information starting at the time specified as the | |
319 | .B UNTIL | |
320 | field in the previous line in the file used by the previous line. | |
321 | Continuation lines may contain an | |
322 | .B UNTIL | |
323 | field, just as zone lines do, indicating that the next line is a further | |
324 | continuation. | |
325 | .PP | |
326 | A link line has the form | |
327 | .sp | |
328 | .nf | |
329 | .ti +.5i | |
330 | .ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u | |
331 | Link LINK-FROM LINK-TO | |
332 | .sp | |
333 | For example: | |
334 | .sp | |
335 | .ti +.5i | |
336 | Link Europe/Istanbul Asia/Istanbul | |
337 | .sp | |
338 | .fi | |
339 | The | |
340 | .B LINK-FROM | |
341 | field should appear as the | |
342 | .B NAME | |
343 | field in some zone line; | |
344 | the | |
345 | .B LINK-TO | |
346 | field is used as an alternate name for that zone. | |
347 | .PP | |
348 | Except for continuation lines, | |
349 | lines may appear in any order in the input. | |
350 | .PP | |
351 | Lines in the file that describes leap seconds have the following form: | |
352 | .nf | |
353 | .ti +.5i | |
354 | .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 | |
355 | .sp | |
356 | Leap YEAR MONTH DAY HH:MM:SS CORR R/S | |
357 | .sp | |
358 | For example: | |
359 | .ti +.5i | |
360 | .sp | |
361 | Leap 1974 Dec 31 23:59:60 + S | |
362 | .sp | |
363 | .fi | |
364 | The | |
365 | .BR YEAR , | |
366 | .BR MONTH , | |
367 | .BR DAY , | |
368 | and | |
369 | .B HH:MM:SS | |
370 | fields tell when the leap second happened. | |
371 | The | |
372 | .B CORR | |
373 | field | |
374 | should be | |
375 | .q + | |
376 | if a second was added | |
377 | or | |
378 | .q - | |
379 | if a second was skipped. | |
380 | .\" There's no need to document the following, since it's impossible for more | |
381 | .\" than one leap second to be inserted or deleted at a time. | |
382 | .\" The C Standard is in error in suggesting the possibility. | |
383 | .\" See Terry J Quinn, The BIPM and the accurate measure of time, | |
384 | .\" Proc IEEE 79, 7 (July 1991), 894-905. | |
385 | .\" or | |
386 | .\" .q ++ | |
387 | .\" if two seconds were added | |
388 | .\" or | |
389 | .\" .q -- | |
390 | .\" if two seconds were skipped. | |
391 | The | |
392 | .B R/S | |
393 | field | |
394 | should be (an abbreviation of) | |
395 | .q Stationary | |
396 | if the leap second time given by the other fields should be interpreted as GMT | |
397 | or | |
398 | (an abbreviation of) | |
399 | .q Rolling | |
400 | if the leap second time given by the other fields should be interpreted as | |
401 | local wall clock time. | |
402 | .SH NOTE | |
403 | For areas with more than two types of local time, | |
404 | you may need to use local standard time in the | |
405 | .B AT | |
406 | field of the earliest transition time's rule to ensure that | |
407 | the earliest transition time recorded in the compiled file is correct. | |
408 | .SH FILE | |
409 | /usr/share/zoneinfo standard directory used for created files | |
410 | .SH "SEE ALSO" | |
411 | ctime(3), tzfile(5), zdump(8) | |
412 | .\" @(#)zic.8 7.14 |