From 68884a571ffa49a93898f0368f64638c31623fb7 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 16 Sep 2007 11:59:56 +0000 Subject: [PATCH] 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 --- django/utils/dateformat.py | 4 ++-- 1 file 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'"