diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-30 01:20:47 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-30 01:21:15 +0000 |
commit | 7898737ebf37436a50805bacbc116b047de7e424 (patch) | |
tree | c4f101e37d3d63e5ac1c08b99272863edc8085d4 /lib/PublicInbox/MsgTime.pm | |
parent | d012bfbedf10b925433d1b7bd823370347371e33 (diff) | |
download | public-inbox-7898737ebf37436a50805bacbc116b047de7e424.tar.gz |
Some folks had bad mail clients which generated 3-digit years around Y2K...
Diffstat (limited to 'lib/PublicInbox/MsgTime.pm')
-rw-r--r-- | lib/PublicInbox/MsgTime.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/MsgTime.pm b/lib/PublicInbox/MsgTime.pm index 4295e873..c67a41ff 100644 --- a/lib/PublicInbox/MsgTime.pm +++ b/lib/PublicInbox/MsgTime.pm @@ -47,6 +47,9 @@ sub msg_date_only ($) { my ($ts, $zone); foreach my $d (@date) { $zone = undef; + # Y2K problems: 3-digit years + $d =~ s!([A-Za-z]{3}) (\d{3}) (\d\d:\d\d:\d\d)! + my $yyyy = $2 + 1900; "$1 $yyyy $3"!e; $ts = eval { str2time($d) }; if ($@) { my $mid = $hdr->header_raw('Message-ID'); |