[Mailman-Developers] clobber_date bug
Thu, 8 Nov 2001 16:08:44 -0600
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
'Thu Nov 8 16:01:44 2001'
>>> time.timezone /3600
'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".