Subject: | timezones ignoring in strptime |
use Time::Piece;
my @time_with_format = (
'2008-02-15 10:42:52 +0100',
'%Y-%m-%d %H:%M:%S %z',
);
print join ',', @time_with_format, "\n";
my $time = Time::Piece->strptime(@time_with_format);
print $time->strftime, ', tzoffset ',$time->tzoffset, "\n";
i get this output:
2008-02-15 10:42:52 +0100,%Y-%m-%d %H:%M:%S %z,
Fri, 15 Feb 2008 10:42:52 UTC, tzoffset 0
It was expecting 09:42:52 UTC. Or am I doing something wrong?