summaryrefslogtreecommitdiff
path: root/django/utils/dateformat.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-09-16 11:59:56 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-09-16 11:59:56 +0000
commit68884a571ffa49a93898f0368f64638c31623fb7 (patch)
treeae8a6ea1749f658754cce08a06050ecb196a0087 /django/utils/dateformat.py
parentc012b8964e596423b68f4ec4b1b57253cf0ae7b0 (diff)
Fixed #2633 -- Fixed timezone computation in O() format function, using fix from [6300].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/dateformat.py')
-rw-r--r--django/utils/dateformat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py
index 0e6541c721..9a296c3f2d 100644
--- a/django/utils/dateformat.py
+++ b/django/utils/dateformat.py
@@ -166,8 +166,8 @@ class DateFormat(TimeFormat):
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'"