Getting a named DateTime::TimeZone from an offset

[email protected] ("Randy J. Ray")
Newsgroups perl.datetime
Message-ID <[email protected]>
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" timezone, the one I can get a name or a short-name for. It
seems to me that I *should* be able to do this, given an offset and a flag as
to whether the date/time I'm working with is DST or not. But I cannot puzzle it
out. The best guess I've come up with is to get the list of all timezones, and
iterate through them comparing their offset values to the one I have (changing
it, if necessary, if DST is in effect). Surely this is not the only way to do this?

Randy
-- 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Randy J. Ray      Sunnyvale, CA      http://www.rjray.org   [email protected]

Silicon Valley Scale Modelers: http://www.svsm.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.