Article View: mod.std.unix
Article #206Re: POSE proposal for TZ
From: Moderator, John Quarterman
Date: Wed, 26 Feb 1986 04:02
Date: Wed, 26 Feb 1986 04:02
63 lines
3086 bytes
3086 bytes
From: Jack Jansen <seismo!mcvax!jack>
Date: 25 Feb 86 20:56:12 N (Tue)
Organization: AMOEBA project, CWI, Amsterdam
Well, even though the discussion doesn't seem to have anything
to do with standardising, it *is* interesting.
[ Comments on how to handle timezones are explicitly requested
in an appendix of the current P1003 draft. -mod ]
I like the outside of elsie!ado's proposal, but I think the
implementation could be done more simple and cheap.
First (not too important), if you go for binary files, you
shouldn't put two arrays of fixed size in the beginning.
This will inevitably mean trouble for future generation. If you
*do* insist on binary data, make it variable sized array, and
put a count in.
Second, and most important, I think the method is far too complex
for its achievements. I think something along the following
lines would work as easy, and be much simpler to set up:
- view normal time and dst as *different* timezones. If a certain
area has had more than one dst offset since written history(jan70),
see those as different too. Note that different timezones could
have the same name.
- Per timezone, keep a list with transition-times, and new timezones.
- Further, use a scheme along the lines of elsie!ado's proposal, so
use files in a specified directory, and use a link to get the
local default time.
Now, two typical files would look like:
/etc/tz/FOT:
# FOT - Far Out Time.
FOT +11:28 # Offset from GMT
Apr 1, 1970 FST
Apr 1, 1971 FST
Apr 1, 1972 FST.1972
...
/etc/tz/FST:
# FST - Far out Summer Time.
# Differs by 1:10 hour from FST.
FST +12:38
Sep 1, 1970 FOT
...
/etc/tz/FST.1972:
# FST.2 - Far out Summer Time exceptional situation for 1972.
# Differs 1:11 hour from FOT.
FST +12:39
Sep 1, 1972 FOT
Note that these files should be in binary, of course, and transition
times in order of ascending magnitude.
Also, if you do a settz("FST"), and present a date in november,
a quick binary search will immedeately get you to the Sep 1 transition,
and get you to the right timezone. Note that this will *also* work for
timezones with the same names: the name in col. 2 of the files, and in
the settz() call, are filenames, and the first entry in the file is
the name that will be used on output.
--
Jack Jansen, jack@mcvax.UUCP
The shell is my oyster.
Volume-Number: Volume 5, Number 61
Technical Details
Message-ID:
<4284@ut-sally.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!decwrl!pyramid!ut-sally!std-unixReferences:
<4257@ut-sally.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ut-sally.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!decwrl!pyramid!ut-sally!std-unix From: std-unix@ut-sally.UUCP (Moderator, John Quarterman) Newsgroups: mod.std.unix Subject: Re: POSE proposal for TZ Message-ID: <4284@ut-sally.UUCP> Date: Tue, 25-Feb-86 23:02:15 EST Article-I.D.: ut-sally.4284 Posted: Tue Feb 25 23:02:15 1986 Date-Received: Fri, 28-Feb-86 02:29:08 EST References: <4257@ut-sally.UUCP> Organization: IEEE/P1003 Portable Operating System Environment Committee Lines: 63 Approved: jsq@sally.UUCP