X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FMsgTime.pm;h=8703d7bc0a78293dbe4735e34c5a339ad8cffb6c;hb=d857e7dc0d816b635a7ead09c3273f8c2d2434be;hp=8eee9a7586922c0fb302421c4c195b4540793fd2;hpb=95bdac7f09c69036efed537a4d03d5bdd2ae4eb6;p=public-inbox.git 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) ? '-' : '+';