Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://517910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2023-11-29 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?