timezonesetting local time zone |
Miscellaneous Information |
TZ
=standardHH[:MM[:SS]]
[daylight[HH[:MM[:SS]]]
[,startdate[/starttime], enddate[/endtime]]]
TZ
(time zone) environment variable. If left
undefined, the TZ
variable defaults to the current
time zone setting of your operating system.
The value of the TZ
variable has the following five
fields
An alphabetic abbreviation for the local standard time zone (for example, GMT, EST, MSEZ).
The time offset westwards from the universal reference time. A leading
minus sign (-
) means that the local time zone is east of the
universal reference time. An offset of this form must follow
standard and can also optionally follow daylight. An
optional colon (:
) separates hours from optional minutes and
seconds.
The abbreviation for your local daylight savings time zone. If the first and third fields are identical or third field is missing, Daylight Saving Time conversion is disabled. The number of hours, minutes, and seconds your local Daylight Savings Time is offset from UTC when Daylight Savings Time is in effect. If the Daylight Savings Time abbreviation is specified, and the offset omitted, the offset of one hour is assumed.
A rule that identifies the start and end of Daylight Savings Time --
specifying when Daylight Savings Time should be in effect. Both the
startdate and enddate must be present, and must either
take the form J
n, n, or
M
m.n.d..
J
n is the Julian day n (1 <= n
<= 365) and does not account for leap days.M
m.n.d, the dth day (0 <= d
<= 6) of week n of month m of the year (1 <=
n <= 5, 1 <= m <= 12 where week 5 is the
last d day in month m, which may occur in either the
fourth or fifth week). In addition, week 1 is the first week where
the dth day occurs, and day zero is Sunday.In the first case, the reference time is GMT and thus stored time values are correct world wide. A simple change of theTZ=EST5EDT TZ=EST0EDT TZ=EST0
TZ
variable prints local time correctly, anywhere. In the second case, the
reference time is Eastern Standard Time and the only conversion performed is for
Daylight Saving Time. Therefore, there is no need to adjust the hardware clock
for Daylight Saving Time twice per year. In the third case, the reference time
is always the time reported. This is suggested if the hardware clock on your
machine automatically adjusts for Daylight Saving Time or you insist on manually
resetting the hardware time twice a year.
Other examples include:
The first applies to Newfoundland, while the second works in most of Western Europe. Here are some time zone scenarios that involve Daylight Savings Time specification:TZ=NST3:30NDT2:00 TZ=MSEZ-1
The first scenario shows theTZ=PST0PDT-1 TZ=ACST-09:30ACDT-10:30,M10.5.0/2:00,M3.5.0/2:00
TZ
of a person in
Seattle who stores local time on a PC, but does not adjust the clock to
agree with Daylight Savings Time. The stated time zone precedes the machine
clock time by one hour when Daylight Savings Time is in effect.
The second scenario shows the TZ
set by a person in
Australia who sets a PC clock to UTC and never adjusts it. The machine clock
precedes UTC by 9.5 hours when Daylight Savings Time is not in effect, and by
10.5 hours when in effect. Daylight Savings Time is in effect from 2:00 am on
the last Sunday in October until 2:00 am on the last Sunday in March.
TZ
variable is a superset
of that supported by UNIX System V.