[Zope-dev] DateTime.rfc822() bug?

Lennart Regebro lennart@torped.se
Mon, 14 Oct 2002 12:12:57 +0200


From: "Geir Bækholt" <geirh@funcom.com>
> i can confirm that this is a bug in DateTime.rfc822(), and that
> rfc-conformant mailclients choke on it aswell..

Oh, man, I've looked at DateTime now, and it's a mess... (ar at least, the
timeone hadnling is).  I'm seriously considering making rfc822() into this:

    def rfc822(self):
        """Return the date in RFC 822 format"""
        return '%s, %2.2d %s %d %2.2d:%2.2d:%2.2d %s' % (
            self._aday,self._day,self._amon,self._year,
            self._hour,self._minute,self._nearsec,'-0000')

That would return the RFC2822 format that explicitly specifies that there is
no timezone information included... At least that would make it compliant.
:-/

A better way would be storing the timzone offset internally in the DateTime
object and using it, but there timezone handling is spread out all over the
place, so I haven't really gotten a grip on it yet.


Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/