[Zope-Checkins] CVS: Packages/DateTime - DateTime.py:1.85.12.11.10.1

Lennart Regebro regebro at nuxeo.com
Mon Nov 8 13:44:02 EST 2004


Update of /cvs-repository/Packages/DateTime
In directory cvs.zope.org:/tmp/cvs-serv10137/lib/python/DateTime

Modified Files:
      Tag: regebro-strftime_1127-branch
	DateTime.py 
Log Message:
Collector #1127 fixed: strftime returned the incorrect time if the timezone was not the same as the local timezone.


=== Packages/DateTime/DateTime.py 1.85.12.11 => 1.85.12.11.10.1 ===
--- Packages/DateTime/DateTime.py:1.85.12.11	Mon Aug  2 05:49:18 2004
+++ Packages/DateTime/DateTime.py	Mon Nov  8 13:43:32 2004
@@ -1488,12 +1488,8 @@
         return millis
 
     def strftime(self, format):
-        # Format the date/time using the *current timezone representation*.
-        diff = _tzoffset(self._tz, self._t)
-        format = re.sub('(^\|[^%])%z',
-                               '\\1%+05d' % (diff / 36),
-                               format)
-        return strftime(format, safegmtime(self.timeTime() + diff))
+        # Format the date/time using the *local timezone representation*.
+        return strftime(format, safelocaltime(self.timeTime()))
 
     # General formats from previous DateTime
     def Date(self):



More information about the Zope-Checkins mailing list