Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tz(M) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

environ(M)

date(C)

ctime(S)



     TZ(M)                    XENIX System V                     TZ(M)



     Name
          TZ - Time zone environment variable.

     Syntax
          TZ=sssn[ddd[m][;start[/time],end[/time]]] ; export TZ

          setenv TZ sssn[ddd[m][;start[/time],end[/time]]]

          /etc/tz

     Description
          TZ is the shell environment variable for the time zone of
          the system and is set in the files /etc/rc, /.profile, and
          /etc/default/login.

          The shell script /etc/tz, generally run during installation,
          prompts for the correct time zone and makes the changes in
          the appropriate files.

          /etc/tz also prompts for the dates when time is shifted from
          standard to daylight time and back, and for the number of
          hours to shift (partial hours in the form of hh:mm:ss are
          acceptable).

          Users living in a time zone different than that of the host
          machine may change TZ in their $HOME/.profile or
          $HOME/.login files.

          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 e.g.
                      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 (partial hours are valid e.g.
                      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



     Page 1                                           (printed 8/7/87)





     TZ(M)                    XENIX System V                     TZ(M)



                      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      nth (1 _ n _ 53)- day of week d (0 _ d _ 6)**
          Mm.n.d         nth (1 _ n _ 5)= day of week d in 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.

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

          For the simple expression of Eastern Standard/Daylight Time
          TZ is set as follows:

             TZ=EST5EDT ; export TZ
             (for sh(C) and vsh(C))

             setenv TZ EST5EDT
             (for csh(C))

          The fully expressed TZ string for Eastern Standard/Daylight
          Time using the current U.S. law of changing to daylight
          saving time on the first Sunday in April, and back to
          standard time on the Sunday week in October at 2:00 a.m.
          local time would be:

             TZ=EST05:00:00EDT04:00:00;M4.1.0/02:00:00,M10.5.0/02:00:00

          To change the time zone for the entire system, run the shell
          script /etc/tz (as root) or use an editor to change the



     Page 2                                           (printed 8/7/87)





     TZ(M)                    XENIX System V                     TZ(M)



          variable TZ in the files /etc/rc, /.profile and
          /etc/default/login.  In /etc/rc the line changing the time
          zone (see the sh example above) must occur before the
          /etc/asktime command.  The TZ variable in /etc/default/login
          causes the time zone to be set correctly on logging in and
          for programs such as uucico.

     Files
          /etc/rc
          /etc/default/login
          /etc/tz
          $HOME/.profile
          $HOME/.login

     See Also
          environ(M), date(C), ctime(S)

     Notes
          The date(C) automatically switches from Standard Time to
          Summer Time (Daylight Saving Time).  Leap days are properly
          accounted for.

          Changes to TZ are immediately effective, (i.e. if a process
          changes the TZ variable, the next call to a ctime(S) routine
          returns a value based on the new value of the variable).






























     Page 3                                           (printed 8/7/87)



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