X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FMsgTime.pm;h=8703d7bc0a78293dbe4735e34c5a339ad8cffb6c;hp=8eee9a7586922c0fb302421c4c195b4540793fd2;hb=d857e7dc0d816b635a7ead09c3273f8c2d2434be;hpb=03255d56a53d390a7f7bb069e0f1c6ea5d34756c diff --git a/lib/PublicInbox/MsgTime.pm b/lib/PublicInbox/MsgTime.pm index 8eee9a75..8703d7bc 100644 --- a/lib/PublicInbox/MsgTime.pm +++ b/lib/PublicInbox/MsgTime.pm @@ -104,7 +104,8 @@ sub str2date_zone ($) { # off is the time zone offset in seconds from GMT my ($ss,$mm,$hh,$day,$month,$year,$off) = Date::Parse::strptime($date); - return undef unless(defined $off); + return unless defined($year); + $off //= 0; # Compute the time zone from offset my $sign = ($off < 0) ? '-' : '+';