Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

TIMEZONE(4)

rc2(1)

ctime(3)

profile(4)

environ(4)



  TIMEZONE(4)                         CLIX                         TIMEZONE(4)



  NAME

    TIMEZONE - Default system time zone file

  DESCRIPTION

    The /etc/TIMEZONE file sets and exports the time zone environmental
    variable TZ.

    This file is ``dotted'' into other files that must know the time zone.

    In most installations, TZ is set to the correct value by default when the
    user logs on, with the local /etc/profile file (see profile(4)).

    The form of the TZ variable is as follows, where std indicates standard
    time, dst indicates daylight savings time, and offset indicates the time
    that must be added to local time to arrive at Greenwich Mean Time (GMT):

    CLIX:  stdoffset[dst[offset][; clix_rule]]
    POSIX:  stdoffset[dst[offset][, posix_rule]]

    In the POSIX-compliant version, note the use of the comma (,) instead of
    the semicolon (;) to separate the rule from the rest of the construct.

    The std and dst specifiy the standard time zone and the alternate time
    zone (such as Daylight Savings Time), respectively.  The time zone name
    contains three alphabetic characters.  Only std is required; if dst is not
    given, the alternate time zone does not apply to the locale.  Uppercase
    and lowercase letters are permitted in the std and dst time zone names.

    The offset has the following form, where hh is the number of hours
    (between 0 and 24), mm is the number of minutes (between 0 and 59), and ss
    is the number of seconds (between 0 and 59):

    [+|-]hh[mm[ss]]

    A leading - indicates that the time is east of the Prime Meridian; a
    leading + indicates that the time is west of the Prime Meridian.

    The *_rule describes when to change to daylight savings time, and when to
    change back to standard time.  If no rule is specified, the days for the
    United States for that year are used, and the time defaults to 02:00:00.
    The CLIX rule, POSIX-compliant rule, and the United States rule are
    explained in the following sections.

  Using the CLIX Rule

    The clix_rule has the following form, where start_date and start_time
    describe when to change to daylight savings time, and end_date and
    end_time describe when to change back to standard time:




  2/94 - Intergraph Corporation                                              1






  TIMEZONE(4)                         CLIX                         TIMEZONE(4)



    start_date/start_time,end_date/end_time

    The *_date fields have a value of n, which is the Julian day and has
    values from 1 to 366 inclusive.

    The format of the *_time fields is the same as for offset, except that no
    leading sign is allowed.  If no time is given, the default is 00:00:00.

  Using the POSIX Rule

    The posix_rule has the following form, where start_date and start_time
    describe when to change to daylight savings time, and end_date and
    end_time describe when to change back to standard time:

    start_date/start_time,end_date/end_time

    The format of the *_date fields is one of the following:

    Jn     The Julian day n (between 1 and 365).  Leap days are not counted;
           that is, February 28 is always day 59 and March 1 is day 60.  It is
           not possible to refer to February 29.

    n      In the POSIX-compliant version, the zero-based Julian day (between
           0 and 365).  Leap days are counted, and it is possible to refer to
           February 29.

    Mm.n.d In the POSIX-compliant version, the dth day (between 0 and 6) of
           the nth week (between 0 and 5) of the mth month (between 0 and 12).
           If m is 5, it means "the last day d in month m," which may occur in
           either the fourth or fifth week.  Week 1 is the first week in which
           day d occurs; day 0 is Sunday.

    The format of the *_time fields is the same as for offset, except that no
    leading sign is allowed.  If no time is given, the default is 02:00:00.

  Using the United States Rule

    If the alternate time zone start and end dates are not provided, the days
    for the United States that year will be used.  The following table shows
    the days that are used, according to the year:

    From 1987 to the present
              The start_date is the first Sunday in April, and the end_date is
              the last Sunday in October.

    From 1976 to 1986
              The start_date is the last Sunday in April, and the end_date is
              last Sunday in October.

    1975      The start_date is the last Sunday in February, and the end_date
              is last Sunday in October.



  2                                              Intergraph Corporation - 2/94






  TIMEZONE(4)                         CLIX                         TIMEZONE(4)



    1974      The start_date is the first Sunday in January, and the end_date
              is last Sunday in November.

    From 1970 to 1973
              The start_date is last Sunday in April, and the end_date is the
              last Sunday in October.

    If the time is not provided, it defaults to 02:00:00.

  EXAMPLES

    1.  A simple setting for New Jersey could be as follows:

        TZ=EST5EDT

        In this example, EST is the abbreviation for the main time zone, 5 is
        the difference, in hours, between Greenwich Mean Time and the main
        time zone, and EDT is the abbreviation for the alternate time zone.

        The contents of /etc/TIMEZONE for this setting would be as follows:

        # Time Zone
        TZ=EST5EDT
        export TZ


    2.  The most complex representation of the same setting, for the year
        1986, is as follows:

        TZ="EST5:00:00EDT4:00:00;117/2:00:00,299/2:00:00"

        In this example:

        ⊕  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.



  2/94 - Intergraph Corporation                                              3






  TIMEZONE(4)                         CLIX                         TIMEZONE(4)



        ⊕  2:00:00 is the number of hours, minutes, and seconds past midnight
           when the alternate time zone will end.

    3.  A southern hemisphere setting, such as for the Cook Islands, could be
        as follows:

        TZ="KDT9:30KST10:00;64/5:00,303/20:00"

        In this example:

        ⊕  KDT is the abbreviation for the main time zone, which is 9 hours
           and 30 minutes later than GMT.

        ⊕  KST is the abbreviation for the alternate time zone, which is 10
           hours later than GMT.

        ⊕  The starting date of daylight savings time is the 64th day at 5:00
           A.M.

        ⊕  The ending date of daylight savings time is the 303rd day at 8:00
           P.M.

    4.  In this POSIX-compliant setting, daylight savings time occurs between
        February 27 and March 2.  February 29 in leap years does not affect
        the time change on March 2.

        TZ="std0dst,J58,J61"


    5.  In this POSIX-compliant setting, daylight savings time occurs between
        the first Tuesday in January and the fifth Thursday in February.  If
        there is no fifth week, the last week of the month is used.

        TZ="std0dst,M01.1.2,M02.5.5"


  NOTES

    When the clix_rule is used, the TZ variable must be surrounded by double
    quotes as shown.

    The system administrator must change the Julian start and end days at the
    beginning of a leap year and at the beginning of the following year if the
    n format is used for the date in the clix_rule and the posix_rule 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.

  RELATED INFORMATION




  4                                              Intergraph Corporation - 2/94






  TIMEZONE(4)                         CLIX                         TIMEZONE(4)



    Commands:  rc2(1)

    Functions:  ctime(3)

    Files:  profile(4), environ(4)

















































  2/94 - Intergraph Corporation                                              5




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026