1 .\" $NetBSD: tzset.3,v 1.23 2009/03/10 23:25:32 joerg 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 Coordinated Universal Time (UTC) is used (without leap second
38 appears in the environment and its value is not a null string:
41 if the value begins with a colon, it is used as a pathname of a file
42 from which to read the time conversion information;
44 if the value does not begin with a colon, it is first used as the
45 pathname of a file from which to read the time conversion information,
46 and, if that file cannot be read, is used directly as a specification
47 of the time conversion information.
52 is used as a pathname, if it begins with a slash, it is used as an
53 absolute pathname; otherwise, it is used as a pathname relative to
54 .Pa /usr/share/zoneinfo .
55 The file must be in the format specified in
60 is used directly as a specification of the time conversion information,
61 it must have the following syntax (spaces inserted for clarity):
63 .Bd -literal -offset indent
72 .Bl -tag -width "std and dst" -compact
73 .It Cm std No and Cm dst
74 Three or more bytes that are the designation for the standard
83 is missing, then summer time does not apply in this locale.
84 Upper- and lowercase letters are explicitly allowed.
85 Any characters except a leading colon (:), digits, comma (,), minus (-),
86 plus (+), and ASCII NUL are allowed.
88 Indicates the value one must add to the local time to arrive at
89 Coordinated Universal Time.
94 .Bd -literal -offset indent
108 is required and may be a single digit.
118 summer time is assumed to be one hour ahead of standard time.
119 One or more digits may be used; the value is always interpreted as a
121 The hour must be between zero and 24, and the minutes (and
122 seconds) \(em if present \(em between zero and 59.
125 the time zone shall be east of the Prime Meridian; otherwise it shall be
126 west (which may be indicated by an optional preceding
129 Indicates when to change to and back from summer time.
134 .Bd -literal -offset indent
146 describes when the change from standard to summer time occurs and the
149 describes when the change back happens.
152 field describes when, in current local time, the change to the other
156 is one of the following:
157 .Bl -tag -width "The Julian day" -compact
164 Leap days are not counted; that is, in all years \(em including leap
165 years \(em February 28 is day 59 and March 1 is day 60.
166 It is impossible to explicitly refer to the occasional February 29.
168 The zero-based Julian day (0\ \*[Le]
171 Leap days are counted, and it is possible to refer to
174 .It Cm M Ns Ar m No . Ar n No . Ar d
190 \*[Le]\ 12, where week 5 means
191 .Dq the\ last Ar d No day\ in\ month Ar m
192 which may occur in either the fourth or the fifth week).
193 Week 1 is the first week in which the
200 has the same format as
202 except that no leading sign
216 the rules specified by the
221 .Pa /usr/share/zoneinfo
222 are used, with the standard and summer time offsets from UTC replaced
223 by those specified by the
228 For compatibility with System V Release 3.1, a semicolon (;) may be
231 from the rest of the specification.
235 environment variable does not specify a
237 format file and cannot be interpreted as a direct specification, UTC
240 .Bl -tag -width /usr/share/zoneinfo/posixrules -compact
241 .It Pa /etc/localtime
243 .It Pa /usr/share/zoneinfo
244 time zone information directory
245 .It Pa /usr/share/zoneinfo/posixrules
246 used with POSIX-style TZ's
247 .It Pa /usr/share/zoneinfo/GMT
252 .Pa /usr/share/zoneinfo/GMT
253 is absent, UTC leap seconds are loaded from
254 .Pa /usr/share/zoneinfo/posixrules .
266 .\" @(#)newtzset.3 8.2
267 .\" This file is in the public domain, so clarified as of
268 .\" 2009-05-17 by Arthur David Olson.