Re: Thread date problems... 2.0a21

From: Paul Haldane <>
Date: Mon, 17 May 1999 10:51:08 +0100 (GMT)
Message-ID: <>

Remember - most of this stuff is disabled in the 'production' code (and I wrote most of that message from memory of the code - not always a good idea :->).

Quick rundown on how I think we should handle dates (not necessarily how we're handling them right now).

We expect each message to have two times - _received_ (added by the system doing delivery, and held in the 'From ' line) and the _sent_ (added by the sending system and held in the Date: line). If one of these is missing or unparseable then we use the other for both. If both are missing or unparseable then we could use the current local time (as well as warning the user).

If we have both times then we can add an extra sanity check - received must be later than sent. I tried this on a number of mail archives and found that the simple check threw up too many false positives - either because of unsynchronised clocks or (around the time of switches to/from daylight savings time) differences of 1 hour because of faulty timezone algorithms.

I figured that if a message was shown as being sent more than 70 minutes _after_ it was received then one of those times had to be wrong. I reckon that using the received time should give more consistent results as this is being added by a local mailserver rather than a MUA on an unknown remote system. I propose therefore to disregard the given sent time where it is more than 70 minutes (or some similar period) before the received time and use the received time for both (at the moment the sent time is only used for display purposes - all sorting is done on the received time).


On Fri, 14 May 1999, John Finlay wrote:

> Does this mean that you are assuming that a message will be delivered within
> 70m of being sent? What does it mean to "favour the '^From ' line "?
> Thanks
> John
> Paul Haldane wrote:
> > You may see different behaviour with different messages, because if we
> > can't parse one of the dates, we'll use the other for both. If the two
> > dates disagree wildly (currently more than 70 minutes) then we'll favour
> > the '^From ' line as it's likely to be more consistent.
Received on Tue 18 May 1999 11:26:31 AM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:51 PM GMT GMT