Setting the TZ environment string in PGP 2.6.X
Used with the permission of Joel McNamara-Thanks for clarifying this
ever confusing issue
By default, PGP applies the rules used by the United States and Canada to
determine when daylight savings time begins
and ends. Daylight savings time begins on the first Sunday in April and
ends on the last Sunday in October. If you're in a
country that doesn't use this rule, you'll have to customize the TZ setting.
In MS-DOS, the syntax to set an environment variable is:
SET variable=some_string
The "SET" keyword is implied in all the examples given below, which should
be read as starting with "SET TZ=".
The value of the TZ environment variable should be set as follows (spaces
are for clarity only).
std offset dst offset , rule
The expanded format is as follows:
std offset[dst[offset][,start[/time],end[/time]]]
std, dst
three or more letters that are the designation for the standard (std)
or summer (dst) time zone. Only std is required. If dst is omitted,
then summer time does not apply in this locale. Upper- and lowercase
letters are allowed. Any characters except for a leading colon (:),
digits, comma (,), minus (-), plus (+), and ASCII NUL (0) are allowed.
offset
indicates the value one must add to the local time to arrive at
Coordinated Universal Time (UTC). The offset has the form:
hh[:mm[:ss]]
The minutes (mm) and seconds (ss) are optional. The hour (hh) is
required and may be a single digit. The offset following std is
required. If no offset follows dst, summer time is assumed to be one
hour ahead of standard time. One or more digits may be used; the value
is always interpreted as a decimal number. The hour may be between 0
and 24, and the minutes (and seconds) - if present - between 0 and 59.
If preceded by a "-", the time zone will be east of the Prime Meridian;
otherwise it will be west (which may be indicated by an optional
preceding "+").
rule
indicates when to change to and back from summer time. The rule has the
form:
date/time,date/time
where the first date describes when the change from standard to summer
time occurs and the second date describes when the change back
happens. Each time field describes when, in current local time, the
change to the other time is made.
The format of date may be one of the following:
Jn
The Julian day n (1 <= n <= 365). Leap days are not
counted.
That is, in all years - including leap years - February 28 is day 59 and
March 1 is day 60. It is impossible to explicitly refer to the occasional
February 29.
n
The zero-based Julian day (0 <= n <= 365). Leap years are
counted, and it is possible to refer to February 29.
Mm.n.d
The d'th day (0 <= d <= 6) of week n of month m of the
year (1 <= n <= 5, 1 <= m <= 12, where week 5 means
"the last d day in month m" which may occur in the fourth or fifth
week). Week 1 is the first week in which the d'th day occurs.
Day zero is Sunday.
The time has the same format as offset except that no leading sign ("+"
or "-") is allowed. The default, if time is omitted, is 02:00:00.
Some examples are:
- TZ=EST5EDT
Eastern Standard Time is 5 hours earlier than Coordinated Universal Time
(UTC). Standard time and daylight saving time both apply to this
locale. By default, Eastern Daylight Time (EDT) is one hour ahead of
standard time (i.e., EDT4). Since it is not specified, daylight saving
time starts on the first Sunday of April at 2:00 A.M. and ends on the
last Sunday of October at 2:00 A.M. This is the default when the TZ
variable is not set.
- TZ=EST5EDT4,M4.1.0/02:00:00,M10.5.0/02:00:00
This is the full specification for the default when the TZ variable is
not set. Eastern Standard Time is 5 hours earlier than Coordinated
Universal Time (UTC). Standard time and daylight saving time both
apply to this locale. Eastern Daylight Time (EDT) is one hour ahead of
standard time. Daylight saving time starts on the first (1) Sunday (0)
of April (4) at 2:00 A.M. and ends on the last (5) Sunday (0) of
October (10) at 2:00 A.M.
- TZ=PST8PDT
Pacific Standard Time is 8 hours earlier than Coordinated Universal Time
(UTC). Standard time and daylight saving time both apply to this
locale. By default, Pacific Daylight Time is one hour ahead of
standard time (i.e., PDT7). Since it is not specified, daylight saving
time starts on the first Sunday of April at 2:00 A.M. and ends on the
last Sunday of October at 2:00 A.M.
- TZ=NST3:30NDT1:30
Newfoundland Standard Time is 3 and 1/2 hours earlier than Coordinated
Universal Time (UTC). Standard time and daylight saving time both
apply to this locale. Newfoundland Daylight Time is 1 and 1/2 hours
earlier than Coordinated Universal Time (UTC).
- TZ=CET-1
Central European Time is 1 hour later than Coordinated Universal Time
(UTC). Daylight saving time does not apply in this locale.
- TZ=EST3EDT,M10.3.0/0,M.2.2.0/0
Belo Horizonte, Brasil, and most other metropolitan areas of
Brasil (including Brasilia).
Here are some further examples and an RFC page on the subject, courtesy of
Torkil Zachariassen
<[email protected]>
- TZ=CET-1DST,M3.5.0/2:00,M10.5.0/3:00
Denmark
- CET = Central European Time
- -1 = one hour to the East of the Greenwich meridian,
about the Berlin time accepted by most Western
countries on the continent.
- DST = Americanese for "Daylight Saving Time"
- M3 = Starts in the month of March
- 5 = at the last day number 0
- 0 = Sunday
- 2:00 = start time of the addition
- M10 = Ending in the month of October (This is a
difference from 1995!)
- 5.0 = again, on the fifth Sunday...
- 3:00 = at 3 in the morning, we return to CET-1.
- TZ=NZST-12NZDT,M10.1.0/2,M3.3.0/3
New Zealand
If some of your programs don't like the 4 letter abbreviations,
try 3 letter alternatives such as NST and, perhaps, NDT.
|