source: trunk/minix/man/man5/TZ.5@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 3.3 KB
Line 
1.TH TZ 5
2.SH NAME
3TZ \- Time zone environment variable
4.SH SYNOPSIS
5\fBTZ=\fIzone\fR[\fB\-\fR]\fIoffset\fR[\fIdst\fR[\fIoffset\fR][\fB,\fIstart\fR[\fB/\fItime\fR]\fB,\fIend\fR[\fB/\fItime\fR]]]
6.SH DESCRIPTION
7.de SP
8.if t .sp 0.4
9.if n .sp
10..
11The
12.B TZ
13environment variable tells functions such as the
14.BR ctime (3)
15family and programs like
16.B date
17what the time zone and daylight saving rule is. The value of
18.B TZ
19has the \s-2POSIX\s+2 standardized form shown in the synopsis. This form
20specifies the zone names, offsets from GMT, and daylight saving changeover
21times for at least the current year.
22.TP
23.I zone
24A three or more letter name for the time zone in normal (winter) time.
25.TP
26.BI [\-] offset
27A signed time telling the offset of the time zone westwards from Greenwich.
28The time has the form
29.I hh[:mm[:ss]]
30with a one of two digit hour, and optional two digit minutes and seconds.
31.TP
32.I dst
33The name of the time zone when daylight saving is in effect. It may
34be followed by an offset telling how big the clock correction is other than
35the default of 1 hour.
36.TP
37\fIstart\fR/\fItime\fR,\fIend\fR/\fItime\fR
38Specifies the start and end of the daylight saving period. The
39.I start
40and
41.I end
42fields indicate on what day the changeover occurs. They must be in one of
43the following formats:
44.SP
45.ta +5
46.in +5
47.ti -5
48\fBJ\fIn\fR The Julian day
49.I n
50(1 <=
51.I n
52<= 365) ignoring leap days, i.e. there is no February 29.
53.SP
54.ti -5
55\fIn\fR The zero-based Julian day
56(0 <=
57.I n
58<= 365). Leap days are not ignored.
59.SP
60.ti -5
61.BI M m . n . d
62.br
63This indicates month
64.IR m ,
65the
66.IR n -th
67occurrence of day
68.I d
69(1 <=
70.I m
71<= 12, 1 <=
72.I n
73<= 5, 0 <=
74.I d
75<= 6, 0=Sunday). The 5-th occurrence means the last occurrence of that day
76in a month. So
77.B M4.1.0
78is the first Sunday in April,
79.B M9.5.0
80is the last Sunday in September.
81.in -5
82.SP
83The
84.I time
85field indicates the time the changeover occurs on the given day.
86.SH EXAMPLES
87Greenwich Mean Time:
88.PP
89.RS
90.B TZ=GMT0
91.RE
92.PP
93Central European Time, 1 hour east from Greenwich, daylight saving starts on
94the last Sunday in March at 2 AM and ends on the last Sunday in October
95at 3 AM:
96.PP
97.RS
98.B TZ='CET\-1CEST,M3.5.0/2,M10.5.0/3'
99.RE
100.PP
101British time, daylight saving starts and ends at the same moment as CET,
102but in an earlier time zone:
103.PP
104.RS
105.B TZ=GMT0BST,M3.5.0/1,M10.5.0/2
106.RE
107.PP
108The eastern european time zones also have the changeovers at the same
109absolute time as British time and CET.
110.PP
111U.S. Eastern Standard Time, 5 hours west from Greenwich, daylight saving
112starts on the first Sunday in April at 2 AM and ends on the last Sunday in
113October at 2 AM:
114.PP
115.RS
116.B TZ=EST5EDT,M4.1.0/2,M10.5.0/2
117.RE
118.PP
119It shouldn't surprise you that daylight saving in New Zealand is observed
120in the months opposite from the previous examples. It starts on the first
121Sunday in October at 2 AM and ends on the third Sunday in March at 3 AM:
122.PP
123.RS
124.B TZ=NZST\-12NZDT,M10.1.0/2,M3.3.0/3
125.RE
126.SH "SEE ALSO"
127.BR readclock (8),
128.BR date (1).
129.SH BUGS
130You may have noticed that many fields are optional. Do no omit them,
131because the defaults are bogus. If you need daylight saving then fully
132specify the changeovers.
133.PP
134West is negative, east is positive, ask any sailor.
135.PP
136Next year's time zone and daylight saving time are determined by politicians.
137.SH AUTHOR
138Kees J. Bot (kjb@cs.vu.nl)
Note: See TracBrowser for help on using the repository browser.