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
This commit is contained in:
Malcolm Tredinnick 2007-09-16 11:59:56 +00:00
parent c012b8964e
commit 68884a571f
1 changed files with 2 additions and 2 deletions

View File

@ -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'"