Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ timezone(F) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctime(S)

environ(M)

profile(M)

rc2(ADM)

tz(M)

initscript(ADM)


 timezone(F)                   06 January 1993                    timezone(F)


 Name

    timezone - set default system time zone

 Description

    The /etc/TIMEZONE file sets and exports the time zone environmental vari-
    able TZ.

    This file is ``dotted'' into other files that must know the time zone,
    including /etc/cshrc, /etc/profile, and /etc/rc2.

    TZ contains the following information:

    (sss)  One to nine letters designating the standard time zone.

    (n)    Number of hours past Greenwich mean time for the standard time
           (partial hours are valid, for example 12:30:01). Positive hours
           are west of Greenwich, negative numbers are east of Greeenwich.

    (ddd)  One to nine letters designating the local daylight savings time
           (summer time) zone. If not present, summer time is assumed not to
           apply.

    (m)    Number of hours past Greenwich mean time for the summer time (par-
           tial hours are valid, for example 11:30:01).  Positive hours are
           west of Greenwich, negative numbers are east of Greeenwich.  If m
           is not given, the distance to GMT during summer time is assumed to
           be one hour less than during standard time.

    (start)
           The rule defining the day summer time begins.  In the southern
           hemisphere, the ending day will be earlier in the year than the
           starting day.

    (end)  The rule defining the day summer time ends.

    (time) The time of day the  change to and from summer time occurs. The
           default is 02:00:00 local time.

    The rules for defining the start and end of summer time are as follows:

    Jn          1 based Julian day n (1 <= n <= 365) *
    n           0 based Julian day n (0 <= n <= 364) *
    Wn.d        day d (0 <= d <= 6)** of week n (1 <= n <= 53) +
    Mm.n.d      day d of week n (1 <= n <= 5) # of month m (1 <= m <= 12)


    *  Leap days (February 29) are never counted; that is, February 28 (J59)
       is immediately followed by March 1 (J60) even in leap years.

    ** Sunday is the first day of the week (0). If d is omitted, Sunday is
       assumed.  Note that d is optional.

    +  The 5th week of the month is always the last week containing day d,
       whether there are actually 4 or 5 weeks containing day d.

    #  The 53rd week of the year is always the last week containing day d,
       whether there are actually 52 or 53 weeks containing day d.

    If start and end are omitted, current U.S. law is assumed.

 Examples

    A simple setting 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 pro-
    vided, 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(M)).

 See also

    ctime(S), environ(M), profile(M), rc2(ADM), tz(M), initscript(ADM).

 Notes

    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.

 Standards conformance

    timezone is conformant with:

    X/Open Portability Guide, Issue 3, 1989.


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