timezone(4) DG/UX R4.11MU05 timezone(4)
NAME
timezone - set default system time zone and locale
SYNOPSIS
/etc/TIMEZONE, /etc/TIMEZONE.csh
DESCRIPTION
The files /etc/TIMEZONE and /etc/TIMEZONE.csh set and export the
following environment variables:
TZ time zone
NLSPATH search path for message catalogs
LANG local language
These files are included into other shell scripts (for example,
/etc/profile and /etc/cshrc) to establish this localization
information. /etc/TIMEZONE is also read by /etc/init to initialize
the timezone and locale information for the system startup
procedures.
To change the values of these environment variables, you may edit
these files directly, or use admdate(1M) and admnls(1M), which can be
invoked from sysadm(1M).
If /etc/TIMEZONE is missing, it is created at system startup by
copying the file /etc/TIMEZONE.proto. If /etc/TIMEZONE.csh is
missing, it is created at system startup by copying the file
/etc/TIMEZONE.csh.proto.
NLSPATH and LANG are described in environ(5) and setlocale(3C). The
default value of NLSPATH (in the proto files) is
"/usr/lib/nls/msg/%L/%N". The default value of LANG is "C".
TZ can be either the name of a timezone database file found under the
directory /usr/lib/locale/TZ, preceded by a colon (e.g.
":US/Eastern"), or else a string that describes the timezone rules.
The syntax of such a rule string can be described as follows:
TZ -> zone
| zone signed_time
| zone signed_time zone
| zone signed_time zone dst
zone -> letter letter letter
signed_time -> sign time
| time
time -> hour
| hour : minute
| hour : minute : second
dst -> signed_time
| signed_time , dst_date , dst_date
| , dst_date , dst_date
dst_date -> julian
| julian / time
letter -> a | A | b | B | ... | z | Z
hour -> 00 | 01 | ... | 23
minute -> 00 | 01 | ... | 59
second -> 00 | 01 | ... | 59
julian -> 001 | 002 | ...| 366
sign -> - | +
EXAMPLES
The contents of the file /etc/TIMEZONE could be
# Time Zone
TZ=:US/Eastern
export TZ
# Message catalog search path
NLSPATH=/usr/lib/nls/msg/%L/%N
export NLSPATH
# Language
LANG=C
export C
A simple setting for TZ for New Jersey could be
TZ=EST5EDT
where EST is the abbreviation for the main time zone, 5 is the
difference, in hours, between GMT (Greenwich Mean Time) and the main
time zone, and EDT is the abbreviation for the alternate time zone.
The most complex representation of the same setting, for the year
1986, is
TZ="EST5:00:00EDT4:00:00,117/2:00:00,299/2:00:00"
where 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, 117 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, 299 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.
A southern hemisphere setting such as the Cook Islands could be
TZ="KDT9:30KST10:00,64/5:00,303/20:00"
This setting means that KDT is the abbreviation for the main time
zone, KST is the abbreviation for the alternate time zone, KST is 9
hours and 30 minutes later than GMT, KDT is 10 hours later than GMT,
the starting date of KDT is the 64th day at 5 AM, and the ending date
of KDT is the 303rd day at 8 PM.
Starting and ending times are relative to the alternate time zone.
If the alternate time zone start and end dates and the time are not
provided, the days for the United States that year will be used and
the time will be 2 AM. If the start and end dates are provided but
the time is not provided, the time will be midnight.
Note that in most installations, TZ is set to the correct value by
default when the user logs on, via the local /etc/profile file (see
profile(4)).
NOTES
When the longer format is used, the TZ variable must be surrounded by
double quotes as shown.
The system administrator must change the Julian start and end days
annually if the longer form of the TZ variable is used.
Setting the time during the interval of change from the main time
zone to the alternate time zone or vice versa can produce
unpredictable results.
SEE ALSO
zic(1M), ctime(3C), setlocale(3C), profile(4), environ(5).
Licensed material--property of copyright holder(s)