ATT System V Rlease 3.1 and Timezones
Dennis L. Mumaugh
seismo!cuuxb!dlm
Thu Dec 11 22:12:28 UTC 1986
The P.55 Timezone Proposal has been sent to a low level developer
at ATT Summit, NJ. The current reading is that due to schedule
pressures there is little likely-hood of anything being adopted
by ATT unless it is part of ANSI C for the next year or so.
It also appears that none of the subscribers to the mailing list
are aware of changes and directions for recent releases of ATT
software so here is a summary:
1. The TZ environment is set and maintained in the file
/etc/TIMEZONE and is a Bourne shell file that can be sourced ( .
/etc/TIMEZONE) by any one who wishes.
2. Init (/etc/init == process 1) reads and parses this file and
sets the environment of all children processes with the TZ
variable. It is thus propagated through cron, login and su. [And
thus to csh (just for Mark :-) ]. (Feature in System V Release
3.1 and following).
3. The TZ variable has new syntax and fields. First as sample
TZ=QST-3:15:25QDT-2:25:12;281/02:00:00,315/01:00:00
This says the offset from GMT is 3 hours 15 minutes and 23
seconds; Alternate time starts on Julian day 281 at 2am and
reverts on Julian Day 315 at 1am. Alternate time is offset from
GMT by 2 hours 25 minutes and 12 seconds. Note negative time
offsets are East of Greenwich and thus -5:00 ougt to be somewhere
in Russia. An example of a Southern Hemishpere setting for
perhaps the Cook Islands (not to be considered a real thing, just
a cooked example (no pun):
TZ=KDT9:30KST10:00;64/5:00,303/20:00
For TZ strings with no time specified for the change (Julian date
only) the change of time defaults to midnight local time.
4. If no TZ variable is set or exists default timezone rules are
for GMT.
5. A new sequences of time functions [setcftime,ascftime,cftime]
allow variable formats for time (similar in concept for the funny
formats for date).
int cftime(buf, fmt, clock)
char *buf, *fmt;
time_t clock;
6. A variable LANGUAGE is used to specifiy the language of the
output [default is ENGLISH with /lib/cftime/usa_english ] the
default file. Files in /lib/cftime specify the default names and
abbreviations of the days and months, as well as default strings
for date and cftime (Europeans use dd/mm/yy and USA uses
mm/dd/yy) and such.
7. The environment variable CFTIME can be used to specify the
default format string for cftime related functions and programs
-- date now uses cftime.
Comments:
The new syntax for TZ allows for any time zone rule, but only
allows ONE change per year. The varialbe must be modified and
reset for the year being printed. Thus is TZ is set for 1987 a
full ctime for a previous year will result in odd information for
a few days each spring and fall (US).
It seems like a trivial change to store a table of TZ variables
for each year. The cftime additions are useful for international
situations but still the TZ rules are a bit parochial.
--
=Dennis L. Mumaugh
Lisle, IL ...!{ihnp4,cbosgd,lll-crg}!cuuxb!dlm
More information about the tz
mailing list