Author: mtredinnick
Date: 2007-09-16 06:59:56 -0500 (Sun, 16 Sep 2007)
New Revision: 6358
Modified:
django/trunk/django/utils/dateformat.py
Log:
Fixed #2633 -- Fixed timezone computation in O() format function, using fix
from [6300].
Modified: django/trunk/django/utils/dateformat.py
===================================================================
--- django/trunk/django/utils/dateformat.py 2007-09-16 11:38:32 UTC (rev
6357)
+++ django/trunk/django/utils/dateformat.py 2007-09-16 11:59:56 UTC (rev
6358)
@@ -166,8 +166,8 @@
def O(self):
"Difference to Greenwich time in hours; e.g. '+0200'"
- tz = self.timezone.utcoffset(self.data)
- return u"%+03d%02d" % (tz.seconds // 3600, (tz.seconds // 60) % 60)
+ seconds = self.Z()
+ return u"%+03d%02d" % (seconds // 3600, (seconds // 60) % 60)
def r(self):
"RFC 822 formatted date; e.g. 'Thu, 21 Dec 2000 16:01:07 +0200'"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---