On Thu, Oct 05, 2006 at 11:06:20AM +0100, David Cantrell wrote: > Bill Moseley wrote: > > >BTW: > > > > 'print UnixDate("Dec 3, 2006 9am PST", "%Z %Y %m %d %H %M %S %z " )' > > > > PDT 2006 12 03 10 00 00 -0700 > > I believe that code like that should fail - or at least spit a warning - > as PST is ambiguous. It's used in Pakistan and north America. Yes, I > know it's documented, but really, who on earth checks the documentation > that carefully? Ah well, at least they differ by a goodly amount so one > would hope the bug would be spotted. > > For more excitement, check out CST. If you mean Cuba Summer Time but > actually get Central Standard Time they only differ by two hours, so the > bug is less likely to be spotted. > > Use of timezone abbreviations considered stupid.
I think that's a little harsh. Abbreviations can certainly be useful *in the context in which they were created*. What your really complaining about is bleed through from one "regional" context to another. However, I'd like to point on that this is really a complaint about the behavior of Date::Manip as DateTime::Format::DateManip is really just a wrapper. Since Date::Manip is so widely used there's not really much that can be at this point without breaking a lot of code. Perhaps warnings could be issued on ambiguous TZ abbreviations stating the Olson name of the TZ actually used but that is something that needs to be taken up with the author of Date::Manip. I also recommend that you to read the section of the Date::Manip Pod titled "SHOULD I USE DATE::MANIP". Cheers, -J --
pgpc2jMVtPODQ.pgp
Description: PGP signature