You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by hs...@apache.org on 2005/12/28 23:59:29 UTC
svn commit: r359660 -
/spamassassin/rules/trunk/sandbox/hstern/sandbox-hstern.pm
Author: hstern
Date: Wed Dec 28 14:59:27 2005
New Revision: 359660
URL: http://svn.apache.org/viewcvs?rev=359660&view=rev
Log:
* sandbox-hstern.pm: Third time's the charm for this date parsing issue.
Modified:
spamassassin/rules/trunk/sandbox/hstern/sandbox-hstern.pm
Modified: spamassassin/rules/trunk/sandbox/hstern/sandbox-hstern.pm
URL: http://svn.apache.org/viewcvs/spamassassin/rules/trunk/sandbox/hstern/sandbox-hstern.pm?rev=359660&r1=359659&r2=359660&view=diff
==============================================================================
--- spamassassin/rules/trunk/sandbox/hstern/sandbox-hstern.pm (original)
+++ spamassassin/rules/trunk/sandbox/hstern/sandbox-hstern.pm Wed Dec 28 14:59:27 2005
@@ -20,7 +20,7 @@
use warnings;
use Mail::SpamAssassin::Plugin;
use Mail::SpamAssassin::Logger;
-use Date::Parse;
+use Mail::SpamAssassin::Util;
use vars qw(@ISA);
our @ISA = qw(Mail::SpamAssassin::Plugin);
@@ -46,13 +46,13 @@
my $date = $status->get("Date");
return undef unless $date;
- my $cdate = str2time ($date, "+0000");
+ my $cdate = Mail::SpamAssassin::Util::parse_rfc822_date ($date, "+0000");
return undef unless $cdate; # cannot parse date
my (undef, $cdmin) = gmtime($cdate);
foreach (@$body) {
if ( /^Sent: (.*)/ ) {
- my $csent = str2time ($1, "+0000");
+ my $csent = Mail::SpamAssassin::Util::parse_rfc822_date ($1, "+0000");
next unless $csent; # cannot parse date
my (undef, $csmin) = gmtime($csent);
return $cdmin == $csmin;