You almost can do that. Instead, TZ=:America/Halifax

(America as in North and South America, not the USA).


timezone - set default system time zone



zdump(1M), and zic(1M), environ(5), ctime(3C).

environ(5) environ(5)

environ - user environment


TZ Time zone information. The contents of the environment
variable named TZ are used by the functions ctime(3C),
localtime (see ctime(3C)), strftime(3C), and mktime(3C) to
override the default timezone. If the first character of TZ
is a colon (, the behavior is implementation-defined. In
this implementation, it is the name (not including the
starting colon ( character) of a zoneinfo file relative to
/usr/lib/locale/TZ/. For sh(1) users, the following example
sets the TZ variable to US Central timezone:


and the zoneinfo file /usr/lib/locale/TZ/US/Central will be used by the
time functions mentioned above (See zic(1M) for more information on
zoneinfo files). Otherwise, TZ has the form:


std and dst
Three or more bytes that are the designation for the
standard (std) and daylight savings time (dst)
timezones. Only std is required, if dst is missing,
then daylight savings time does not apply in this
locale. Upper- and lowercase letters are allowed. Any
characters except a leading colon (, digits, a comma
(,), a minus (-), or a plus (+) are allowed.

Indicates the value one must add to the local time to
arrive at Coordinated Universal Time. The offset has
the form:

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 , daylight savings 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 must be between 0 and 24, and the minutes (and
seconds) if present between 0 and 59. Out of range
values may cause unpredictable behavior. If preceded by
a ``-'', the timezone is east of the Prime Meridian;
otherwise it is west (which may be indicated by an
optional preceding ``+'' sign).

Indicates when to change to and back from daylight
savings time, where start/time describes when the change
from standard time to daylight savings time occurs, and
end/time describes when the change back happens. Each
time field describes when, in current local time, the
change is made.

The formats of start and end are one of the following:

Jn The Julian day n (1 < n < 365). Leap days are not
counted. That is, in all years, February 28 is day
59 and March 1 is day 60. It is impossible to
refer to the occasional February 29.

n The zero-based Julian day (0 < n < 365). Leap days
are counted, and it is possible to refer to
February 29.
The dth 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 either the fourth or the fifth week). Week 1 is
the first week in which the dth day occurs. Day
zero is Sunday.

Implementation-specific defaults are used for start and
end if these optional fields are not given.

The time has the same format as offset except that no
leading sign (``-'' or ``+'') is allowed. The default,
if time is not given is 02:00:00.

For example, the most complete setting for New Jersey in
1986 could be


or simply


In the longer version of the New Jersey example of TZ,
EST is the abbreviation for the main time zone, 5:00:00
is the difference, in hours, minutes, and seconds
between GMT and the main time zone, EDT is the
abbreviation for the alternate time zone, 4:00:00 is the
difference, in hours, minutes, and seconds between GMT
and the alternate time zone, 116 is the number of the
day of the year (Julian day) when the alternate time
zone will take effect, 2:00:00 is the number of hours,
minutes, and seconds past midnight when the alternate
time zone will take effect, 298 is the number of the day
of the year when the alternate time zone will end, and
2:00:00 is the number of hours, minutes, and seconds
past midnight when the alternate time zone will end.
Timezone specifications under the IRIX 4 operating
system used a ";" to separate the dst field from the
start field. In conformance with the X/Open XPG4
standard, this is no longer legal, and a "," must be
used in place of the ";".

Reference: in libc/src/gen/time_comm.c:
if (name[0] == ':') /* Olson method */ {

In /usr/include/tzfile.h:
#define TZDIR "/usr/lib/locale/TZ" /* Time zone object file directory */

Compile, put or copy the _binary_ ADO files in /usr/lib/locale/TZ.

# zdump America/Halifax
America/Halifax Wed Apr 28 14:42:26 2004 ADT

# TZ=:America/Halifax date; date
Wed Apr 28 14:45:33 ADT 2004
Wed Apr 28 12:45:33 CDT 2004

$ zdump Pacific/Honolulu America/Anchorage America/Vancouver \
> America/Denver America/Chicago America/Fort_Wayne America/Los_Angeles \
> America/New_York America/Halifax America/Montreal America/Thule \
> Africa/Johannesburg Europe/Moscow Asia/Vladivostok Asia/Tokyo Japan

Pacific/Honolulu Wed Apr 28 07:47:18 2004 HST
America/Anchorage Wed Apr 28 09:47:18 2004 AKDT
America/Vancouver Wed Apr 28 10:47:18 2004 PDT
America/Denver Wed Apr 28 11:47:18 2004 MDT
America/Chicago Wed Apr 28 12:47:18 2004 CDT
America/Fort_Wayne Wed Apr 28 12:47:18 2004 EST
America/Los_Angeles Wed Apr 28 10:47:18 2004 PDT
America/New_York Wed Apr 28 13:47:18 2004 EDT
America/Halifax Wed Apr 28 14:47:18 2004 ADT
America/Montreal Wed Apr 28 13:47:18 2004 EDT
America/Thule Wed Apr 28 13:47:18 2004 AST
Africa/Johannesburg Wed Apr 28 19:47:18 2004 SAT
Europe/Moscow Wed Apr 28 21:47:18 2004 MSD
Asia/Vladivostok Thu Apr 29 04:47:18 2004 VSD
Asia/Tokyo Thu Apr 29 02:51:09 2004 JST
Japan Thu Apr 29 02:51:09 2004 JST

The following header lines retained to effect attribution:
>Date: Wed, 28 Apr 2004 15:50:40 +0000 (GMT)
>From: "George N. White III"
>Subject: Using Arthur Olson's tz data on Irix
>To: info-iris-admin@ARL.ARMY.MIL

>Is there some reason SGI doesn't use Arthur Olson's tz data

>I needed this with the new datatime code in the R stats package, so for
>now it is installed in /usr/local. It would be nice to use, e.g,
>TZ=Canada/Halifax and get DST properly, but SGI's (Irix 6.5.21m)
>/usr/lib/international/timezones has:

>timezone ca_ast { tzspec= AST4 } (instead of AST4ADT)

>Timezone.ca_ast: Canada/Atlantic

>in /usr/lib/international/en/Timezones.

>George N. White III
> Head of St. Margarets Bay, Nova Scotia, Canada

Randolph J. Herber,, +1 630 840 2966, CD/CDFTF PK-149F,
Mail Stop 318, Fermilab, Kirk & Pine Rds., PO Box 500, Batavia, IL 60510-0500,
USA. (Speaking for myself and not for US, US DOE, FNAL nor URA.) (Product,
trade, or service marks herein belong to their respective owners.)