On Mon, 19 Feb 2007, Zefram wrote:

I found a better way: URI::file can translate between filename syntaxes.
We can specify that the $TZ setting is a Unix-style filename, and it gets
translated as appropriate.  On Windows you can do "/c:/etc/localtime"
and the file C:\etc\localtime is used, and "/etc/localtime" translates
to the not-quite-absolute \etc\localtime.

This is actually more bizarre then just having a leading colon, I think. It might be preferable to require an actual file URI with scheme (file:///etc/local/time or file://C:\foo\bar)

There were also two SysV-style strings that were never in Olson, but which
DT::TZ had as links to Olson zones.  These are "AKST9AKDT" and "JST-9".
They were added to satisfy particular DT::TZ users who were using these
$TZ settings.  As they're not in Olson, I reckon these should be treated
as any ordinary SysV string, so this patch has no grandfathering for them.
Those users will have to install DT::TZ::SystemV.  Grandfathering for
them is easily added if you really want to.

I think the grandfathering is a worthy bit of DWIMmery. If we were to use the SystemV handling of AKST9AKDT then those users would get the 1976 DST rules, instead of the up-to-date as of 2007 rules. That hardly seems like a good thing.

I'd love to hear from the original requestor, but I'd guess that they'd prefer to use the correct modern rules, as opposed to a to-the-POSIX-spec interpretation.

After all, this is what we get by using hte Olson database EST5EDT rule, as opposed to the POSIX interpretation, and I think that's a _good_ thing.

Honestly, supporting these POSIX time zones seems of academic interest or useful for emulating some old system's behavior, but if you're writing new code, it doesn't seem like a good idea at all, and I think we need to be pretty careful about inflicting the POSIX semantics on unsuspecting developers.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to