Re: v2a20 formatting and date problems

From: Paul Haldane <Paul.Haldane_at_newcastle.ac.uk_at_hypermail-project.org>
Date: Fri, 14 May 1999 14:45:30 +0100 (GMT)
Message-ID: <Pine.GSO.3.95-960729.990514132424.21779L-100000_at_carr6.ncl.ac.uk>


> 2. date/thread indexes are not properly ordered. Messages arriving
> close together with hypermail in single message update mode result in
> misordering which sometimes gets fixed by new messages coming in, and
> sometimes gets worse with new messages coming in.

Hmmm - I've not noticed this. I'm _reasonably_ confident that the date index will be properly sorted (according to the date in the 'From ' line).

I've not been able to reproduce this (with a21 but I don't thing this has changed between 20 and 21).

You can get _apparent_ misordering because the dates displayed are from the Date: headers whilst the messages are actually sorted by the date in the 'From ' line. Are you sure the messages are mis-sorted in this sense?

There's a little perl script tacked onto the end of this message that checks the ordering of an archive. Takes two parameters, first is the directory containing the archive, second is 0 or 1 - 1 if the reverse config option was used to build the archive - defaults to 0.

> 3. I'd prefer a consistent, local format for the date string in the
> index pages. Parseing the date out of messages coming from multiple
> locations and multiple MUAs creates a confusing mess.

Try 2a21 which has most of the functionality you describe for presentation of dates - some more comments below.

Paul

...
> 3. The date that shows in the indexes is what's parsed out of the sender's
> email. Perhaps this got debated and settled earlier? While it's nice to
> see the order things were sent in, having timezones from around the world
> showing up can make it pretty confusing (especially with the unreliability
> described in item 2).

At the moment we store the dates from the 'From ' line and the Date: line separately - if one is missing or unparseable then we use the other for both. If they differ by more than 70 minutes then we take the time from the 'From ' line (hah - just checked the code and I'm _not_ doing that yet - only prints a warning and that's only if debug is turned on. I'll look at making this happen all the time).

You can see how hypermail has parsed the two dates in the message by looking at the comments in the generated html files. isosent and isoreceived are the times from the Date and From lines respectively formatted as YYYYYMMDDHHmmSS (as per ISO 8601:1988). These are UTC times.

> I think it makes more sense to use the archiving system's date,

The archiving system's date as stored in the 'From ' line has the advantage that it should at least be consistent (and it's more likely to be under your control).

> formatted
> in as terse a format as possible; for example, date -u +"%e %b %Y %H:%M:%S"
> This allows easy comparison, should be reliably parseable out of the
> message header, and minimizes the index page space required because TZ
> and/or GMT offsets are not needed.

a21 allows you to set the the presentation format for date/time using the dateformat option.

> The "show_header" option including "Date" should provide the means to
> preserve the sender's "Date:" field, if that's specifically desired.

I've not allowed for this - thought about it, but then decided not to bother at the moment.

> But
> not in the index, where it can do more harm than good!

Agreed.


Script for checking ordering....

#!/usr/local/bin/perl

$archive = shift; $reverse = shift;
$dateindex = $archive.'/date.html';

open(DATE, "< $dateindex") || die;
while (<DATE>) {

	next unless /^<LI><A HREF="(\d\d\d\d).*/;
	$file = $1;
	push _at_files, $file;

}
close(DATE);

chdir($archive) || die;

$lastdate = '00000000000000';
$debug = 0;

while ($file = shift(_at_files)) {

	print "$file\n";
	open(MESSAGE, "< $file.html") || die;
  	while (<MESSAGE>) {
		next unless /isoreceived/;
		/.*isoreceived="(\d*)".*/;
		$date = $1;
	  	print "$file  $date\n" if $debug > 1;
		if (($reverse && ($date < $lastdate)) ||
		    (!$reverse && ($date > $lastdate))) {
			print "out of order $file $date $lastdate\n";
		}
	}
	close(MESSAGE);
	$lastdate = $date;

} Received on Fri 14 May 1999 04:27:17 PM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT