Incorrect sort order when sorting by date

Gavan Fantom gavan at coolfactor.org
Mon May 18 09:06:52 EDT 2009


Robert Mueller (web) wrote:
> I bet if you look at the Date headers of the problem emails, you'll find
> that they're not RFC compliant.

These are the date headers from the offending emails.

Date: Sun, 29 Mar 2009 01:48:19 -0700
Date: Sun 17 Feb 2008 20:05:01 -0500
Date: Sun 27 Jan 2008 20:15:18 -0500
Date: Sun 30 Dec 2007 20:04:16 -0500
Date: Thu 6 Dec 2007 20:17:13 -0500
Date: Thu 1 Nov 2007 20:02:33 -0400
Date: Mon 22 Oct 2007 20:08:57 -0400
Date: Sat 6 Oct 2007 20:02:46 -0400

I see absolutely nothing wrong with the first one. The rest are missing 
a comma after the day of week. (based on the grammar provided in RFC2822)

> The cyrus date parser is very strict, and if the header isn't RFC
> compliant, you'll get a bad value, and bad sorting.

I could believe that all but the first one fail to parse.

> Looking at the RFC
> 
> http://www.faqs.org/rfcs/rfc5256.html
> 
>    If the sent date cannot be determined (a Date: header is missing or
>    cannot be parsed), the INTERNALDATE for that message is used as the
>    sent date.
> 
> I'm not cyrus is actually doing this though,

If INTERNALDATE is derived from the timestamp on the file, then the 
INTERNALDATE is certainly not what it is sorting on here.

-- 
Gillette - the best a man can forget


More information about the Info-cyrus mailing list