1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
|
'\" te
.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH ZIC 1M "Jan 3, 2006"
.SH NAME
zic \- time zone compiler
.SH SYNOPSIS
.LP
.nf
\fBzic\fR [\fB--\fR\fIversion\fR] [\fB-s\fR] [\fB-v\fR] [\fB-l\fR \fIlocaltime\fR] [\fB-p\fR \fIposixrules\fR]
[\fB-d\fR \fIdirectory\fR] [\fB-y\fR \fIyearistype\fR] [\fIfilename\fR]...
.fi
.SH DESCRIPTION
.sp
.LP
\fBzic\fR reads text from the file(s) named on the command line and creates the
time conversion information files specified in this input. If a \fIfilename\fR
is '\fB\(mi\fR\&', the standard input is read.
.sp
.LP
Input lines are made up of fields. Fields are separated by any number of white
space characters. Leading and trailing white space on input lines is ignored. A
pound sign (\fB#\fR) indicates a comment that extends to the end of the line.
White space characters and pound signs can be enclosed within double quotes
(\fB" "\fR) if they are to be used as part of a field. Any line that is blank
(after comment stripping) is ignored. Non-blank lines are expected to be of one
of three types: rule lines, zone lines, or link lines.
.SS "Rule"
.sp
.LP
A rule line has the form:
.sp
.LP
For example:
.sp
.in +2
.nf
Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
.fi
.in -2
.sp
.sp
.LP
The fields that make up a rule line are:
.sp
.in +2
.nf
Rule USA 1969 1973 - Apr lastSun 2:00 1:00 D
.fi
.in -2
.sp
.sp
.ne 2
.na
\fB\fBNAME\fR\fR
.ad
.RS 12n
Gives the (arbitrary) name of the set of rules this rule is part of.
.RE
.sp
.ne 2
.na
\fB\fBFROM\fR\fR
.ad
.RS 12n
Gives the first year in which the rule applies. The word \fBminimum\fR (or an
abbreviation) means the minimum year with a representable time value. The word
\fBmaximum\fR (or an abbreviation) means the maximum year with a representable
time value.
.RE
.sp
.ne 2
.na
\fB\fBTO\fR\fR
.ad
.RS 12n
Gives the final year in which the rule applies. In addition to \fBminimum\fR
and \fBmaximum\fR (as above), the word \fBonly\fR (or an abbreviation) can be
used to repeat the value of the \fBFROM\fR field.
.RE
.sp
.ne 2
.na
\fB\fBTYPE\fR\fR
.ad
.RS 12n
Gives the type of year in which the rule applies. If \fBTYPE\fR is:
.sp
.ne 2
.na
\fB\&'\fB\(mi\fR\&'\fR
.ad
.RS 14n
The rule applies in all years between \fBFROM\fR and \fBTO\fR, inclusive.
.RE
.sp
.ne 2
.na
\fB\fBuspres\fR\fR
.ad
.RS 14n
The rule applies in U.S. Presidential election years.
.RE
.sp
.ne 2
.na
\fB\fBnonpres\fR\fR
.ad
.RS 14n
The rule applies in years other than U.S. Presidential election years.
.RE
.sp
.ne 2
.na
\fB\fBeven\fR\fR
.ad
.RS 14n
The rule applies to even-numbered years.
.RE
.sp
.ne 2
.na
\fB\fBodd\fR\fR
.ad
.RS 14n
The rule applies to odd-numbered years.
.RE
If \fBTYPE\fR is something else, then \fBzic\fR will attempt to execute the
command
.sp
.in +2
.nf
\fByearistype\fR \fIyear\fR \fBtype\fR
.fi
.in -2
.sp
to check the type of a year: an exit status of \fB0\fR means that the year is
of the given type; an exit status of \fB1\fR means that the year is not of the
given type. The \fByearistype\fR command is not currently provided in the
Solaris environment.
.RE
.sp
.ne 2
.na
\fB\fBIN\fR\fR
.ad
.RS 12n
Names the month in which the rule takes effect. Month names can be abbreviated.
.RE
.sp
.ne 2
.na
\fB\fBON\fR\fR
.ad
.RS 12n
Gives the day on which the rule takes effect. Recognized forms include:
.sp
.ne 2
.na
\fB\fB5\fR\fR
.ad
.RS 11n
the fifth day of the month
.RE
.sp
.ne 2
.na
\fB\fBlastSun\fR\fR
.ad
.RS 11n
The last Sunday in the month
.RE
.sp
.ne 2
.na
\fB\fBlastMon\fR\fR
.ad
.RS 11n
The last Monday in the month
.RE
.sp
.ne 2
.na
\fB\fBSun>=8\fR\fR
.ad
.RS 11n
First Sunday on or after the eighth
.RE
.sp
.ne 2
.na
\fB\fBSun<=25\fR\fR
.ad
.RS 11n
Last Sunday on or before the 25th
.RE
Names of days of the week can be abbreviated or spelled out in full. Note:
There cannot be spaces within the \fBON\fR field.
.RE
.sp
.ne 2
.na
\fB\fBAT\fR\fR
.ad
.RS 12n
Gives the time of day at which the rule takes effect. Recognized forms include:
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 11n
Time in hours
.RE
.sp
.ne 2
.na
\fB\fB2:00\fR\fR
.ad
.RS 11n
Time in hours and minutes
.RE
.sp
.ne 2
.na
\fB\fB15:00\fR\fR
.ad
.RS 11n
24-hour format time (for times after noon)
.RE
.sp
.ne 2
.na
\fB\fB1:28:14\fR\fR
.ad
.RS 11n
Time in hours, minutes, and seconds, where hour 0 is midnight at the start of
the day and hour 24 is midnight at the end of the day.
.RE
Any of these forms can be followed by the letter \fBw\fR if the given time is
local "wall clock" time; \fBs\fR if the given time is local "standard" time; or
\fBu\fR (or \fBg\fR or \fBz\fR) if the given time is universal time. In the
absence of an indicator, wall clock time is assumed.
.RE
.sp
.ne 2
.na
\fB\fBSAVE\fR\fR
.ad
.RS 12n
Gives the amount of time to be added to local standard time when the rule is in
effect. This field has the same format as the \fBAT\fR field (without the
\fBw\fR and \fBs\fR suffixes).
.RE
.sp
.ne 2
.na
\fB\fBLETTER/S\fR\fR
.ad
.RS 12n
Gives the "variable part" (for example, the "S" or "D" in "EST" or "EDT" of
time zone abbreviations to be used when this rule is in effect. If this field
is '\fB\(mi\fR\&', the variable part is null.
.RE
.SS "Zone"
.sp
.LP
A zone line has the form:
.sp
.in +2
.nf
Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
.fi
.in -2
.sp
.sp
.LP
For example:
.sp
.in +2
.nf
Zone Australia/SouthWest 9:30 - CST 1992 Mar 15 12:00
8:30 Aus CST
.fi
.in -2
.sp
.sp
.LP
The fields that make up a zone line are:
.sp
.ne 2
.na
\fB\fBNAME\fR\fR
.ad
.RS 14n
The name of the time zone. This is the name used in creating the time
conversion information file for the zone.
.RE
.sp
.ne 2
.na
\fB\fBGMTOFF\fR\fR
.ad
.RS 14n
The amount of time to add to \fBUTC\fR to get standard time in this zone. This
field has the same format as the \fBAT\fR and \fBSAVE\fR fields of rule lines;
begin the field with a minus sign to subtract time from \fBUTC\fR.
.RE
.sp
.ne 2
.na
\fB\fBRULES/SAVE\fR\fR
.ad
.RS 14n
The name of the rule(s) that apply in the time zone or, alternately, an amount
of time to add to local standard time. If this field is `\fB\(mi\fR\&', then
standard time always applies in the time zone.
.RE
.sp
.ne 2
.na
\fB\fBFORMAT\fR\fR
.ad
.RS 14n
The format for time zone abbreviations in this time zone. The pair of
characters \fB%s\fR is used to show where the "variable part" of the time zone
abbreviation goes. Alternately, a slash (/) separates standard and daylight
abbreviations.
.RE
.sp
.ne 2
.na
\fB\fBUNTIL\fR\fR
.ad
.RS 14n
The time at which the \fBUTC\fR offset or the rule(s) change for a location. It
is specified as a year, a month, a day, and a time of day. The time of day has
the same format as the \fBAT\fR field of rule lines. If this is specified, the
time zone information is generated from the given \fBUTC\fR offset and rule
change until the time specified.
.sp
The month, day, and time of day have the same format as the IN, ON, and AT
columns of a rule; trailing columns can be omitted, and default to the earliest
possible value for the missing columns.
.sp
The next line must be a "continuation" line. This line has the same form as a
zone line except that the string "Zone" and the name are omitted. The
continuation line places information starting at the time specified as the
\fBUNTIL\fR field in the previous line in the file used by the previous line.
Continuation lines can contain an \fBUNTIL\fR field, just as zone lines do,
indicating that the next line is a further continuation.
.RE
.SS "Link"
.sp
.LP
A link line has the form:
.sp
.in +2
.nf
Link LINK-FROM LINK-TO
.fi
.in -2
.sp
.sp
.LP
For example:
.sp
.in +2
.nf
Link Europe/Istanbul Asia/Istanbul
.fi
.in -2
.sp
.sp
.LP
The \fBLINK-FROM\fR field should appear as the \fBNAME\fR field in some zone
line; the \fBLINK-TO\fR field is used as an alternate name for that zone.
.sp
.LP
Except for continuation lines, lines can appear in any order in the input.
.SH OPTIONS
.sp
.ne 2
.na
\fB\fB--\fR\fIversion\fR\fR
.ad
.RS 17n
Outputs version information and exits.
.RE
.sp
.ne 2
.na
\fB\fB-d\fR \fIdirectory\fR\fR
.ad
.RS 17n
Creates time conversion information files in the directory \fIdirectory\fR
rather than in the standard directory \fB/usr/share/lib/zoneinfo\fR.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR \fIlocaltime\fR\fR
.ad
.RS 17n
Uses the given time zone as local time \fIlocaltime\fR. \fBzic\fR acts as if
the file contained a link line of the form:
.sp
.in +2
.nf
Link \fIlocaltime\fR localtime
.fi
.in -2
.sp
.RE
.sp
.ne 2
.na
\fB\fB-p\fR \fIposixrules\fR\fR
.ad
.RS 17n
Uses the rules of the given time zone \fIposixrules\fR when handling
POSIX-format time zone environment variables. \fBzic\fR acts as if the input
contained a link line of the form:
.sp
.in +2
.nf
Link \fIposixrules\fR posixrules
.fi
.in -2
.sp
This option is not used by \fBctime\fR(3C) and \fBmktime\fR(3C) in the Solaris
environment.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 17n
Limits time values stored in output files to values that are the same whether
they are taken to be signed or unsigned. You can use this option to generate
SVVS-compatible files.
.sp
This option is obsolete and may be removed in a future release.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 17n
Complains if a year that appears in a data file is outside the range of years
representable by system time values (\fB0:00:00 a.m.\fR \fBUTC,\fR \fBJanuary
1\fR, \fB1970\fR, to \fB3:14:07 a.m.\fR \fBUTC,\fR \fBJanuary 19\fR,
\fB2038\fR). This option also complains if a time of 24:00 (which cannot be
handled by pre-1998 versions of \fBzic\fR) appears in the input.
.RE
.sp
.ne 2
.na
\fB\fB-y\fR \fIyearistype\fR\fR
.ad
.RS 17n
Uses the given command \fIyearistype\fR rather than \fByearistype\fR when
checking year types (see \fBRules\fR under \fBDESCRIPTION\fR).
.RE
.SH OPERANDS
.sp
.ne 2
.na
\fB\fIfilename\fR\fR
.ad
.RS 12n
A file containing input lines that specify the time conversion information
files to be created. If a \fIfilename\fR is '\fB\(mi\fR\&', the standard input
is read.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/usr/share/lib/zoneinfo\fR\fR
.ad
.sp .6
.RS 4n
Standard directory used for created files
.RE
.sp
.ne 2
.na
\fB\fB/usr/share/lib/zoneinfo/src\fR\fR
.ad
.sp .6
.RS 4n
Directory containing source files
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Committed*
.TE
.sp
.LP
* The \fB-s\fR option is obsolete.
.SH SEE ALSO
.sp
.LP
\fBtime\fR(1), \fBzdump\fR(1M), \fBctime\fR(3C), \fBmktime\fR(3C),
\fBattributes\fR(5)
.SH NOTES
.sp
.LP
For areas with more than two types of local time, you might need to use local
standard time in the \fBAT\fR field of the earliest transition time's rule to
ensure that the earliest transition time recorded in the compiled file is
correct.
.sp
.LP
If the current \fItimezone\fR file is edited and compiled using the "\fBzic\fR"
command, the changes will only be reflected in any new processes that are
running. The most accurate way to reflect the changes for the whole system
would be a reboot.
|