Re: [Mailman-Developers] clobber_date bug
Hello nice Mailman folks, thanks for the great software. I've been using it for over a year to run a handful of small mailing lists and I've always been impressed with the quality.
I just noticed a small bug. On an active list, I turned on the clobber_date setting (to apply the "resent" time to messages stored in the archives), and I noticed that it messed up the order of a bunch of messages in the archive.
The reason is that clobber_date doesn't put the timezone information in the Date: field. So it looks as though the messages are dated GMT instead of GMT-6, and the messages from this morning appear after those from the afternoon.
Example message without clobber_date: Date: Thu, 8 Nov 2001 10:48:20 -0600
Example message with clobber_date: Date: Thu Nov 8 13:33:00 2001 X-Original-Date: Thu, 08 Nov 2001 13:31:30 -0600
While clobber_date doesn't process the existing date, it seems to replace it by the local date (namely the output of ctime(time()). That seems correct to me. Are you certain your local TZ is set properly?
On Thu, Nov 08, 2001 at 01:59:30PM -0800, Dan Mick wrote:
The reason is that clobber_date doesn't put the timezone information in the Date: field. So it looks as though the messages are dated GMT instead of GMT-6, and the messages from this morning appear after those from the afternoon.
Example message without clobber_date: Date: Thu, 8 Nov 2001 10:48:20 -0600
Example message with clobber_date: Date: Thu Nov 8 13:33:00 2001 X-Original-Date: Thu, 08 Nov 2001 13:31:30 -0600
While clobber_date doesn't process the existing date, it seems to replace it by the local date (namely the output of ctime(time()). That seems correct to me. Are you certain your local TZ is set properly?
Using python 1.5.2, ctime() is giving local time without timezone info. If I use asctime(gmtime(time)) I seem to get the correct result.
[eds@ike eds]$ python Python 1.5.2 (#1, Dec 21 2000, 15:29:08) [GCC egcs-2.91.66 19990314/Linux (egcs- on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
time.ctime(time.time()) 'Thu Nov 8 16:01:44 2001' time.tzname ('CST', 'CDT') time.timezone /3600 6 time.asctime(time.gmtime(time.time())) 'Thu Nov 8 22:06:05 2001'
So it looks like my options are to use asctime(gmtime(time)) or write a routine that parses time.timezone into "-0600".
participants (2)
-
Dan Mick
-
Eric Seppanen