I wrote:
>I've got plans for DT:TZ:Local.

Another strand of this that might be of interest.  I got thinking
about the various mechanisms we have that try to DWIM with a ruleless
SystemV-style zone spec (such as "GMT0BST").  The Olson database has
the main US ones as links to appropriate geographical zones, and also
(commented out) another version of them that just implements the US
1976 rules like DT:TZ:SystemV does.  AIX and HP-UX both have systems in
which the known geographical timezones are named in the SystemV style.
DT:TZ has a couple of irregular aliases to Olson zones.  In all of these
cases, only a handful of zones are supported, and all by manual effort.
I'd like to have a systematic approach to this.

Given the availability of the entire Olson database, we can look at every
zone and pick out its abbreviations and offsets for any particular year
we're interested in (or for all years within a broad range).  In some
cases there will be offset changes that don't fit into the SystemV scheme,
but usually you'll be able to generate a ruleless SystemV-style spec
that (partially) describes the behaviour of a zone in a particular year.
Then, given such a ruleless zone spec, you can emit a list of all the
candidate geographical zones.

The most conservative potential use of this would be in a timezone
selection widget: "you're currently configured for EST5EDT, do you
want America/New_York, America/Chicago, ...?".  A more advanced usage
would be to automatically pick one of the candidates (on what basis I
don't know) and either use the zone as a whole or apply its DST rules
while staying within the POSIX limits of what the zone spec could mean.
This could potentially be useful default behaviour somewhere within DT:TZ.

-zefram

Reply via email to