about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/MsgTime.pm3
1 files changed, 2 insertions, 1 deletions
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) ? '-' : '+';