1 .\" $NetBSD: tzset.3,v 1.26 2013/09/20 19:06:54 christos Exp $
7 .Nd initialize time conversion information
17 function uses the value of the environment variable
19 to set time conversion information used by
23 does not appear in the environment,
24 the best available approximation to local wall clock time, as
33 appears in the environment but its value is a null string,
34 Universal Time (UT) is used, with the abbreviation
36 and without leap second correction; please see
40 appears in the environment and its value is not a null string:
43 if the value begins with a colon, it is used as a pathname of a file
44 from which to read the time conversion information;
46 if the value does not begin with a colon, it is first used as the
47 pathname of a file from which to read the time conversion information,
48 and, if that file cannot be read, is used directly as a specification
49 of the time conversion information.
54 is used as a pathname, if it begins with a slash, it is used as an
55 absolute pathname; otherwise, it is used as a pathname relative to
56 .Pa /usr/share/zoneinfo .
57 The file must be in the format specified in
62 is used directly as a specification of the time conversion information,
63 it must have the following syntax (spaces inserted for clarity):
65 .Bd -literal -offset indent
74 .Bl -tag -width "std and dst" -compact
75 .It Cm std No and Cm dst
76 Three or more bytes that are the designation for the standard
85 is missing, then summer time does not apply in this locale.
86 Upper- and lowercase letters are explicitly allowed.
87 Any characters except a leading colon (:), digits, comma (,), minus (-),
88 plus (+), and ASCII NUL are allowed.
90 Indicates the value one must add to the local time to arrive at
91 Coordinated Universal Time.
96 .Bd -literal -offset indent
110 is required and may be a single digit.
120 summer time is assumed to be one hour ahead of standard time.
121 One or more digits may be used; the value is always interpreted as a
123 The hour must be between zero and 24, and the minutes (and
124 seconds) \(em if present \(em between zero and 59.
127 the time zone shall be east of the Prime Meridian; otherwise it shall be
128 west (which may be indicated by an optional preceding
131 Indicates when to change to and back from summer time.
136 .Bd -literal -offset indent
148 describes when the change from standard to summer time occurs and the
151 describes when the change back happens.
154 field describes when, in current local time, the change to the other
156 As an extension to POSIX, daylight saving is assumed to be in effect
157 all year if it begins January 1 at 00:00 and ends December 31 at
158 24:00 plus the difference between daylight saving and standard time,
159 leaving no room for standard time in the calendar.
162 is one of the following:
163 .Bl -tag -width "The Julian day" -compact
170 Leap days are not counted; that is, in all years \(em including leap
171 years \(em February 28 is day 59 and March 1 is day 60.
172 It is impossible to explicitly refer to the occasional February 29.
174 The zero-based Julian day (0\ \*[Le]
177 Leap days are counted, and it is possible to refer to
180 .It Cm M Ns Ar m No . Ar n No . Ar d
196 \*[Le]\ 12, where week 5 means
197 .Dq the\ last Ar d No day\ in\ month Ar m
198 which may occur in either the fourth or the fifth week).
199 Week 1 is the first week in which the
206 has the same format as
208 except that POSIX does not allow a leading sign
213 As an extension to POSIX, the hours part of
215 can range from \(mi167 through 167; this allows for unusual rules such as
216 .Dq the Saturday before the first Sunday of March .
223 Here are some examples of
225 values that directly specify the time zone rules; they use some of the
229 stands for US eastern
230 time (EST), 5 hours behind UTC, without daylight saving.
231 .It FJT\(mi12FJST,M10.3.1/146,M1.3.4/75
232 stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours ahead
233 of UTC, springing forward on October's third Monday at
234 146:00 (i.e., 02:00 on the first Sunday on or after October 21), and
235 falling back on January's third Thursday at 75:00 (i.e., 03:00 on the
236 first Sunday on or after January 18).
237 .It IST\(mi2IDT,M3.4.4/26,M10.5.0
238 stands for Israel Standard Time (IST) and Israel Daylight Time (IDT),
239 2 hours ahead of UTC, springing forward on March's fourth
240 Tuesday at 26:00 (i.e., 02:00 on the first Friday on or after March
241 23), and falling back on October's last Sunday at 02:00.
242 .It WART4WARST,J1/0,J365/25
243 stands for Western Argentina Summer Time (WARST), 3 hours behind UTC.
244 There is a dummy fall-back transition on December 31 at 25:00 daylight
245 saving time (i.e., 24:00 standard time, equivalent to January 1 at
246 00:00 standard time), and a simultaneous spring-forward transition on
247 January 1 at 00:00 standard time, so daylight saving time is in effect
248 all year and the initial
251 .It WGT3WGST,M3.5.0/\(mi2,M10.5.0/\(mi1
252 stands for Western Greenland time (WGT) and Western Greenland Summer
253 Time (WGST), 3 hours behind UTC, where clocks follow the EU rules of
254 springing forward on March's last Sunday at 01:00 UTC (\(mi02:00 local
255 time) and falling back on October's last Sunday at 01:00 UTC
256 (\(mi01:00 local time).
263 the rules specified by the
268 .Pa /usr/share/zoneinfo
269 are used, with the standard and summer time offsets from UTC replaced
270 by those specified by the
275 For compatibility with System V Release 3.1, a semicolon (;) may be
278 from the rest of the specification.
282 environment variable does not specify a
284 format file and cannot be interpreted as a direct specification, UTC
287 .Bl -tag -width /usr/share/zoneinfo/posixrules -compact
288 .It Pa /etc/localtime
290 .It Pa /usr/share/zoneinfo
291 time zone information directory
292 .It Pa /usr/share/zoneinfo/posixrules
293 used with POSIX-style TZ's
294 .It Pa /usr/share/zoneinfo/GMT
299 .Pa /usr/share/zoneinfo/GMT
300 is absent, UTC leap seconds are loaded from
301 .Pa /usr/share/zoneinfo/posixrules .
313 .\" @(#)newtzset.3 8.2
314 .\" This file is in the public domain, so clarified as of
315 .\" 2009-05-17 by Arthur David Olson.