Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: How to convert time from one time zone to another

by robin (Chaplain)
on Dec 19, 2005 at 21:51 UTC ( #517910=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How to convert time from one time zone to another
in thread How to convert time from one time zone to another

You have a good point. There is a frustrating trade-off, in that “numeric pseudo-timezones” are pretty portable. The named (Olson) timezones still won’t work everywhere, unfortunately, although the situation is improving.

If portability is not a concern, and the Olson names work on your system, you should definitely use them. If you need to be portable and to deal with all the intricacies of daylight saving time, you probably have to use DateTime with DateTime::TimeZone (which parses the Olson database) and install a copy of the Olson database if your system doesn't already have it.

(Unless there's a better way that I don't know about?)

Update: Actually I think the module is distributed with a pre-parsed copy of the database, so at least you don't have to worry about that. It's still a lumbering behemoth whose documentation is rather confusing, at least to me; but it should give accurate results at least.


Comment on Re^3: How to convert time from one time zone to another

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://517910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-12-29 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (187 votes), past polls