about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-02-15 23:20:20 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-02-15 23:20:20 +0000
commitc83ba91fcebd7e346e71ef155e7c618130c70111 (patch)
treea2f66b0b42ec2212ad0e681a0d0d891903f92036 /lib/PublicInbox/Import.pm
parentc54ad85d10c1149361bf2a8120ce8ae38bf7847f (diff)
downloadpublic-inbox-c83ba91fcebd7e346e71ef155e7c618130c70111.tar.gz
Despite email not existing until 1971; "Jan 1, 1970 00:00:00"
seems like a common default timestamp for some test emails
to use as a Date: header.
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index f8d10037..1f831a7b 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -233,7 +233,7 @@ sub parse_date ($) {
                 warn "bogus TZ offset: $zone, ignoring and assuming +0000\n";
                 $zone = '+0000';
         }
-        $ts ||= time;
+        $ts = time unless defined $ts;
         $ts = 0 if $ts < 0; # git uses unsigned times
         "$ts $zone";
 }