On Tue, Nov 14, 2006 at 09:02:32AM +0100, Hanno Hecker wrote:
> Hi Robin,
> 
> On Mon, 13 Nov 2006 22:42:24 -0800
> "Robin H. Johnson" <[EMAIL PROTECTED]> wrote:
> > I've recently started seeing a lot of spam with insane dates bypassing
> > teh check_basicheaders day count.
> > 
> > A Date line from two of the emails:
> >     Tue, 19 Jan 2038 11:14:07 +0800
> >     Wed, 23 Mar 1969 05:57:34 -0900
>       ... this one's fsck'd up, it should be a "Sun" instead of "Wed",
>           but see below
> 
> > I tried to figure out a pattern, and did manage to find one: All of
> > them are outside of the 32-bit UNIX time, and Date::Parse fails on
> > every single one of them because of this.
> Hmm, the second works fine here, it just returns something smaller than
> zero.
Ok, I messed up in my writing this post, but there are signficently more of the
post-2038 entries than the pre-1970 ones.

# perl
use Date::Parse qw(str2time);
print str2time("Tue, 19 Jan 2038 11:14:07 +0800");

Sec too small - 24855 < 74752
Sec too big - 24855 > 11647
# 
(Both the 'Sec....' outputs are to stderr).

> You can try 
(snip example)
> tell me if it really works :)
Works on well formed input, but not on malformed input (see the Date::Parse
perldoc to see all the formats it supports).

-- 
Robin Hugh Johnson
E-Mail     : [EMAIL PROTECTED]
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgpjykccG1Cvt.pgp
Description: PGP signature

Reply via email to