HP 3000 Manuals

TZTAB Time Zone Adjustment Table [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

TZTAB Time Zone Adjustment Table 

The differences between Coordinated Universal Time (UTC) and local time
are described in table form in the file TZTAB.LIB.SYS. This table can be
used in conjunction with historical information to represent several
local areas simultaneously.  This file is also used by mktime() to
compute the UTC from the local time.

The TZTAB file contains one or more time zone adjustment entries.  The
first line of the entry contains a unique string that is compared to the
value of the TZ environment variable.

The format of the first line of a time zone adjustment entry is:

tzname diff dstzname 

where:

tzname                Is the time zone name or abbreviation.

diff                  Is the difference in hours from UTC. Fractional
                      values of diff are expressed in minutes preceded by
                      a colon.  For example, 1:15 equals one hour and
                      fifteen minutes.

dstzname              Is the name or abbreviation of the Daylight Savings
                      Time zone.

The first line of the entry always begins with an alphabetic character.

The second and subsequent lines of each entry contain details about the
adjustments for a time zone.  Each line contains seven fields.  The
seventh field specifies a particular time zone adjustment.  The first
through sixth fields describe the time range for the adjustment.  The
fields are separated by blanks or tabs.  The meanings of each field are
as follows:

First field (0-59)    Specifies the minute at which a time zone
                      adjustment takes effect.

Second field (0-23)   Specifies the hour at which a time zone adjustment
                      takes effect.

Third field (1-31)    Specifies the day of the month at which a time zone
                      adjustment takes effect.

Fourth field (1-12)   Specifies the month in which a time zone adjustment
                      takes effect.

Fifth field           Specifies the year in which a time zone adjustment
(1970-1999)           takes effect.

Sixth field (0-6)     Specifies the day of the week in which a time zone
                      adjustment takes effect, with 0 equal to Sunday, 1
                      to Monday, etc.

The minute, hour, and month fields contain a single number within the
range given above for each.  The day of the month, year, and day of the
week fields may contain a single number or a range of numbers separated
by a minus sign.  Either the day of the month or the day of the week
field must be a range, and the other must be a single number.

The seventh field is a string that describes the time zone adjustment in
the following format:

tznamediff 

where:

tzname                An alphabetic string containing the time zone name
                      or abbreviation.  The tzname value must match
                      either the tzname field in the first line of the
                      time zone adjustment entry or the dstzname field in
                      the first line of the entry.

diff                  The difference in hours from GMT. Any fractional
                      value of diff is shown in minutes.

Comments are allowed within time zone adjustment entries.  They begin
with a pound sign (#) and include all characters up to a new line.
Comments are ignored.

Example 

The time zone adjustment entry for the Eastern Time Zone in the United
States is as follows:

     EST5EDT
     0 3 6     1  1974      0-6 EDT4
     0 3 22-28 2  1975      0   EDT4
     0 3 24-30 4  1976-1986 0   EDT4
     0 3 1-7   4  1987-1999 0   EDT4
     0 1 24-30 11 1974      0   EST5
     0 1 25-31 10 1975-1999 0   EST5

Normally, Eastern Standard Time (EST) is five hours earlier than
Coordinated Universal Time.  This is indicated in the first line.
However, during Eastern Daylight Time, the difference is four hours.  The
first time Eastern Daylight Time took effect was on January 6, 1974 at
3:00 am EDT. This information is given in the second line.  Note that the
minute before was 1:59 am EST. The change back to standard time took
effect on the last Sunday in November of the same year.  This information
is given on the sixth line.  At that point, the time changed from 1:59 am
EDT to 1:00 am EST. The transition to Eastern Daylight Time since then
has gone from the last Sunday in February (indicated on the third line)
to the last Sunday in April (fourth line) to the first Sunday in April
(fifth line).  The return to standard time for the same period has
consistently occurred on the last Sunday in October (seventh line).

The TZTAB file was developed by Hewlett-Packard.  It can support and is
compatible with Native Language Support (NLS).



MPE/iX 5.0 Documentation