From 56643bfddba2f7bca60955e5c48435fe58cc8e1c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 29 Nov 2019 12:25:08 +0000 Subject: Date::Parse is now optional -mda should not be dealing with broken Date: headers nowadays, and deprioritize it in our documentation and internal checks. --- lib/PublicInbox/MDA.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/MDA.pm') diff --git a/lib/PublicInbox/MDA.pm b/lib/PublicInbox/MDA.pm index b0dfac45..ef5e7dfa 100644 --- a/lib/PublicInbox/MDA.pm +++ b/lib/PublicInbox/MDA.pm @@ -6,7 +6,7 @@ package PublicInbox::MDA; use strict; use warnings; use Email::Simple; -use Date::Parse qw(strptime); +use PublicInbox::MsgTime; use constant MAX_SIZE => 1024 * 500; # same as spamc default, should be tunable use constant MAX_MID_SIZE => 244; # max term size - 1 in Xapian @@ -51,8 +51,7 @@ sub usable_str { } sub usable_date { - my @t = eval { strptime(@_) }; - scalar @t; + defined(eval { PublicInbox::MsgTime::str2date_zone($_[0]) }); } sub alias_specified { -- cgit v1.2.3-24-ge0c7