http://www.perlmonks.org?node_id=997322


in reply to Re^2: TimeZone convert problem.
in thread TimeZone convert problem.

Start with one of these
my $dt = DateTime::Format::ISO8601->parse_datetime( $datestr ); my $dt = DateTime::Format::DateParse->parse_datetime( $datestr ); my $dt = DateTime::Format::Flexible->parse_datetime( $datestr );
Then finish with
$dt->set_time_zone( 'Country/City' ); print $dt->strftime( q[%a %b %e %H:%M:%S %Z %Y] ), "\n";
or whatever

Replies are listed 'Best First'.
Re^4: TimeZone convert problem.
by ikegami (Pope) on Oct 06, 2012 at 04:49 UTC
    or
    my $dt = DateTime::Format::RFC3339->parse_datetime( $datestr );