alt Zope2.6DateTimeFix

A fix for the Zope 2.6 DateTime bug, described on http://zwiki.org/IssueNo0345 . This bug is also fixed in 2.6.1 and later. If you are still using 2.6.0 it's probably time to upgrade.

You need to alter line 1441 of the file $ZOPE_ROOT/lib/python/DateTime/DateTime.py, and change the word "localzone" in it to "timezone". Ie:

    def rfc822(self):
        """Return the date in RFC 822 format"""
        if self._tz == self._localzone0: #Use local standard time
            tzoffset = _tzoffset2rfc822zone(localzone)
        elif self._tz == self._localzone1: # Use local daylight saving time
            tzoffset = _tzoffset2rfc822zone(altzone)

Should become:

    def rfc822(self):
        """Return the date in RFC 822 format"""
        if self._tz == self._localzone0: #Use local standard time
            tzoffset = _tzoffset2rfc822zone(timezone)
        elif self._tz == self._localzone1: # Use local daylight saving time
            tzoffset = _tzoffset2rfc822zone(altzone)




subject:
 

Add single-paragraph zope tips below for display in the zopewiki footer. Concrete, real-world tips are best. *


page rating: 0 from 0 votes

click to rate (voting as: 127.0.0.1)