Re: Getting a named DateTime::TimeZone from an offset

2008-12-26 Thread Eugene van der Pijll
Randy J. Ray schreef: > In fact, since I'm really just after the short names for the sake of > pretty-printing dates for end-users who aren't impressed by "-08:00" > where they'd expect "PDT", I can use any of the matching zones. It > just seems a waste to have to iterate over the whole set to get

Re: Getting a named DateTime::TimeZone from an offset

2008-12-24 Thread Randy J. Ray
> You can't. They're hopelessly ambiguous. I realize there is ambiguity. But even a list of matching ones would be better than having to do it manually with each new application. For that matter, even using the values from the Olsen database and whatever they default-link to, would allow access t

Re: Getting a named DateTime::TimeZone from an offset

2008-12-24 Thread Zefram
Randy J. Ray wrote: >I get a the timezone as a DateTime::TimeZone::OffsetOnly object. But I'd really >like the "real" timezone, the one I can get a name or a short-name for. You can't. They're hopelessly ambiguous. -zefram

Getting a named DateTime::TimeZone from an offset

2008-12-24 Thread Randy J. Ray
I would suspect this is probably a reasonably-FAQ, but I couldn't find the answer via Google or the datetime wiki... When I parse a ISO 8601 date (used a lot in XML Schema, RPC-XML traffic, etc.), I get a the timezone as a DateTime::TimeZone::OffsetOnly object. But I'd really like the "real" timez