use warnings; use strict; use DateTime; use DateTime::Format::Strptime; my $strp = DateTime::Format::Strptime->new(on_error=>'croak', pattern => '%Y-%m-%d-%H:%M:%S %Z'); my $datestr = "2016-07-30-15:30:00 GMT"; my $dt = $strp->parse_datetime($datestr); print $dt->strftime('%Y-%m-%d-%H:%M:%S %Z'), "\n"; $dt->set_time_zone('America/Los_Angeles'); print $dt->strftime('%Y-%m-%d-%H:%M:%S %Z'), "\n"; __END__ 2016-07-30-15:30:00 UTC 2016-07-30-08:30:00 PDT