COHERENT manpages

This page displays the COHERENT manpage for TIMEZONE [Time zone information].

List of available manpages
Index


TIMEZONE -- Environmental Variable

Time zone information
TIMEZONE=standard:offset[:daylight: date:date:hour:minutes]

The COHERENT  system records time internally as  Greenwich Mean Time (GMT).
It does so  to make it easier to coordinate  exchange of information across
systems in different time zones around the world.

TIMEZONE is  an environmental parameter  that holds information  about your
local time  zone.  This information is used by  COHERENT's time routines to
convert GMT to  the date and time in your  local area.  TIMEZONE takes into
account your local time  zone's offset from Greenwich, whether your country
uses daylight  savings time,  and the date  and hour that  daylight savings
time begins and ends.

To set TIMEZONE, use the command

    export TIMEZONE=[description]

where description  is the string that describes your  time zone.  What this
string consists of will be  described below.  Most users write this command
into the file .profile, so that TIMEZONE is set automatically whenever they
log onto the COHERENT system.

COHERENT's  installation procedure creates  file /etc/timezone,  which sets
TIMEZONE. This  file is  executed by /etc/profile  when each user  logs in.
Thus, you  must set the TIMEZONE  in your .profile only  if it differs from
the system's TIMEZONE as set  in /etc/timezone. This would be necessary if,
for example,  a user  in New York  were to regularly  login on a  system in
Chicago.

The Description String

A TIMEZONE  description string consists of seven  fields that are separated
by colons.  Fields 1 and 2 must be filled; fields 3 through 7 are optional.

Field 1 gives the name of  your standard time zone.  Field 2 gives the time
zone's offset  from Greenwich Mean  Time in minutes.   Offsets are positive
for  time zones  west of  Greenwich  and negative  for time  zones east  of
Greenwich.  For example, users in Chicago set these fields as follows:

    TIMEZONE=CST:360

CST is  an abbreviation for  Central Standard Time, that  area's time zone;
and 360  refers to the  fact that Chicago's  time zone is  360 minutes (six
hours) ahead of (that is, earlier than) Greenwich.

Field 3 gives the name of the local daylight saving time zone.  In Chicago,
for example, this field would be set as follows:

    TIMEZONE=CST:360:CDT

CDT  is an  abbreviation for  Central Daylight Time.   The absence  of this
field indicates that your area does not use daylight saving time.

Fields 4 and  5 specify the dates on which  daylight saving time begins and
ends.   If field  3 is  set but  fields 4  and 5  are not,  changes between
standard time  and daylight saving time  are assumed to occur  at the times
legislated  in the  United States:  at 2  A.M. standard  time on  the first
Sunday in April,  and at 2 A.M. daylight saving  time on the last Sunday in
October.

Fields 4  and 5 each  consist of three  numbers separated by  periods.  The
first number specifies  which occurrence of the day in  the month marks the
change, counting  positive occurrences from the beginning  of the month and
negative  occurrences from  the the  end of the  month.  The  second number
specifies a  day of the  week, numbering Sunday  as one.  The  third number
specifies a month  of the year, numbering January as  one.  For example, in
Chicago fields 4 and 5 are set to the following:

    TIMEZONE=CST:360:CDT:1.1.4:-1.1.10

If  the first number  in either  field is  set to zero,  then the  last two
numbers are  assumed to  indicate an absolute  date.  This is  done because
some countries  switch to daylight saving  time on the same  day each year,
instead of a given day of the week.

Finally,  fields 6  and 7  specify the  hour of the  day at  which daylight
saving time begins  and ends, and the number of  minutes of adjustment.  In
Chicago, these are set as follows:

    TIMEZONE=CST:360:CDT:1.1.4:-1.1.10:2:60

The  `2' of  field 6  indicates that  the switch  to daylight  savings time
occurs at  2 A.M.  The  ``60'' of field  7 indicates that  daylight savings
time changes  the local  time by  60 minutes.  Although  60 minutes  is the
standard change,  some regions  of the  world shift by  30, 45, 90,  or 120
minutes; the last shift is also called ``double daylight saving time''.

For  an example  of this  variable's use  in a program,  see the  entry for
asctime().

See Also

environmental variables,
time [overview]

Notes

File  /etc/default/login defines  TIMEZONE  differently: it  uses the  same
format  as the  COHERENT environmental  variable TZ, which  is set  in file
/etc/timezone. Note  that TZ and TIMEZONE  as defined in /etc/default/login
must be identical, or much confusion will result.

For those  requiring more  information on  this subject, much  research has
been performed by astrologers.  See  Time Changes in the World, compiled by
Doris  Chase  Doane  (three  volumes, Hollywood,  California,  Professional
Astrologers, Inc., 1970).