On Thu, Dec 04, 2003 at 02:12:27PM -0600, Dave Rolsky wrote:
> On Thu, 4 Dec 2003, Anton Berezin wrote:
> 
> > > Setting your system's time zone to such a thing is asking for trouble.
> >
> > I really don't know.  Three-letter abbreviations are POSIX.1.  They
> > might be obsolete, but they are still supported by most implementations,
> > and used widely.
> 
> POSIX is wrong.  What else can I say?  POSIX also said that 2000 wasn't a
> leap year, IIRC.
> 
> > "Tools not policy" seem to apply here.
> 
> I'm not sure what that means.
> 
> This isn't a policy issue, it's a question of being correct.  "EST" is not
> a valid Olson database time zone.  If you want to make up some bogus ad
> hoc rule then you can always declare that "EST = America/New_York", but if
> you have to deal with users who may be in multiple time zones for a single
> app, especially something like a web app where you have one database
> (probably storing UTC) and a need to output datetimes in multiple zones,
> then you'll have to do this correctly.
> 
> As for the DateTime project, there's a DateTime::TimeZone::Alias module
> that lets you associate arbitrary names (abbreviations or whatever) with a
> real time zone name.
> 
> But you'd have to define the EST => America/New_York mapping in your own
> code.  Stuff like that will never be part of the core.

Maybe have a default aliases like "certain annoying OS's", to borrow
your expression?  As a matter of fact, last time I tried, Linux did the
same thing - understood them.  "EST" actually designates Indianapolis
time - America/Indianapolis and EST are hardlinked (I presume because it
is "EST" all year round), and "CET" is, I believe, quite unambiguous.

Even funnier still, the zoneinfo package is exactly the same on Linux
and FreeBSD, or at least on Debian and FreeBSD, and there is a whole
bunch of three-letter abbreviations there.  So why to struggle against
the OS?  For an abstract correctness, which might not be that correct
after all (what if I live in Andorra and ask for CET times before 1985;
they are different from Andorra times) ?

Since you did not buy the "tools not policy" principle, I appeal to the
"principle of least astonishment", which in this particular instance
means to support what people expect and what OS's implement.  You may
"strongly urge against using three letter abbreviations" because they
are not correct, but not supporting them outright would, IMHO, be a
mistake.

Cheers,
\Anton.
-- 
Civilization is a fractal patchwork of old and new and dangerously new.
-- Vernor Vinge

Reply via email to