Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: convert GMT to other time zone using Date::Manip

by thargas (Deacon)
on Feb 07, 2011 at 12:47 UTC ( [id://886672]=note: print w/replies, xml ) Need Help??


in reply to Re: convert GMT to other time zone using Date::Manip
in thread convert GMT to other time zone using Date::Manip

Seconded. I've found that the DateTime family of modules are the only ones which correctly handle timezones. They also explain why things don't always work the way you think at first that they should. I never look at any other perl date/time modules except where I'm using some module which uses them.
  • Comment on Re^2: convert GMT to other time zone using Date::Manip

Replies are listed 'Best First'.
Re^3: convert GMT to other time zone using Date::Manip
by SBECK (Chaplain) on Feb 07, 2011 at 14:02 UTC

    Actually, Date::Manip (starting with version 6.00) handles ALL timezones included in the Olsen database (as well as military timezones, timezone names from Windows, etc.) correctly. This includes historical timezones (those no longer in use). The Date::Manip::TZ documentation covers this in detail as suggested elsewhere in this thread.

    Using the functional interface (i.e. Date_ConvTZ) to do the conversion is NOT recommended. It is strongly recommended that the object-oriented interface be used as it can handle timezones 100% correctly whereas the functional interface is serverly limited. A better solution to the problem in the original message would be:

    $d = new Date::Manip::Date; $d->parse($date); $d->convert($to);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found