[Mailman-Users] Problem with Date:-headers
Richard Barrett
r.barrett at openinfo.demon.co.uk
Tue May 6 23:26:33 CEST 2003
Jon
I sent this earlier to Stig petterso at online.no but managed to screw up
putting you and mailman-users on the Cc
Richard
I said to Stig:
Stig
In response to your original query, I think there may be an issue with the
version of email,Utils.parsedate_tz() function that is shipped with Mailman.
Mailman ships with the email module version 2.5.1 and MM uses that in
preference to any version of the email module that is installed with your
Python version.
The first form of date you cited is not parsed successfully and pipermail
reverts to other alternatives, ultimately using now if all else fails.
This looks to be a problem with a standard library module rather than a
pipermail problem per se. Whether this is a bug or a feature in email-2.5.1
I have yet to determine.
The following results are from running Python on a terminal using Python
2.2.2 and you can see the difference in parsing the date between the
version of email that shipped with Python 2.2.2 and the alternative version
(which is loaded instead as a result of the import paths statement) which
shipped with MM 2.1.2
mailman at mailman2:/mailman/run/bin> python
Python 2.2.2 (#3, Feb 11 2003, 16:57:53)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email.Utils import parsedate_tz, mktime_tz
>>> d1 = '22 Mar 2002 13:26:16 +0100'
>>> p1 = parsedate_tz(d1)
>>> print p1
(2002, 3, 22, 13, 26, 16, 0, 0, 0, 3600)
>>>
mailman at mailman2:/mailman/run/bin> python
Python 2.2.2 (#3, Feb 11 2003, 16:57:53)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paths
>>> from email.Utils import parsedate_tz, mktime_tz
>>> d1 = '22 Mar 2002 13:26:16 +0100'
>>> p1 = parsedate_tz(d1)
>>> print p1
None
>>>
mailman at mailman2:/mailman/run/bin>
I will take a look at the email.Utils source code and see if I can sort out
some sort of patch for this. If I cannot see a solution, I will send Barry
Warsaw, who I believe also 'owns' the email module, a problem report.
Regards
Richard
In http://mail.python.org/pipermail/mailman-users/2003-May/028679.html
Stig said;
I just upgraded to Mailman 2.1.2 and regenerated my archives.
After the process was finished, some messages was given todays date, and
was therefor misplaced in the archive hierarcy.
It seems to me that Mailman/Pipermail does not understand this kind of
date-header:
Date: 22 Mar 2002 13:26:16 +0100
while this one is ok:
Date: Fri, 22 Mar 2002 13:08:56 +0100
The first mail is posted using GNUS/Emacs, while the second is posted using
Outlook Express.
Am I right?
Is this a known bug, or is it supposed to be like this? Kind regards,
Stig
More information about the Mailman-Users
mailing list