Hi,

Please see the following page.

 http://mail.python.org/pipermail/mailman-developers/2004-March.txt.gz

The date headers in the page are RFC2822 violation.

 Date: Mon Mar  1 21:01:02 2004
 Date: Tue Mar  2 08:29:07 2004
 Date: Tue Mar  2 08:40:05 2004
 ...

This is because the following code is performed in HyperArch.py.

    def as_text(self):
        d = self.__dict__.copy()
        # We need to guarantee a valid From_ line, even if there are
        # bososities in the headers.
        if not d.get('fromdate', '').strip():
            d['fromdate'] = time.ctime(time.time())
        if not d.get('email', '').strip():
            d['email'] = '[EMAIL PROTECTED]'
        if not d.get('datestr', '').strip():
            d['datestr'] = time.ctime(time.time())
        #

Since there is no datestr, time.ctime() is used.

I think that the following patch solves this problem.

From: SHIGENO Kazutaka <[EMAIL PROTECTED]>
Date: Fri, 20 Feb 2004 23:10:13 +0900 (JST)

> The definition of self.datestr does not exist in pipermail.py.
> How about using the following patch?
> 
> --- pipermail.py        7 Jan 2004 02:41:46 -0000       1.1.1.1
> +++ pipermail.py        20 Feb 2004 13:19:33 -0000
> @@ -240,6 +240,11 @@
>          self._last_article_time = date
>          self.date = '%011i' % date
> 
> +        datestr = message.get('date', None)
> +        if datestr is None:
> +            datestr = message.get('x-list-received-date', None)
> +        self.datestr = datestr
> +
>      def __repr__(self):
>          return '<Article ID = '+repr(self.msgid)+'>'

-- shigeno

_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Reply via email to