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);