mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #16924 -- Corrected date template filter handling of negative (West of UTC) timezone offsets.
The 'O' format specifier output was incorrect. Thanks mrgriscom and Aymeric Augustin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -127,3 +127,9 @@ class DateFormatTests(unittest.TestCase):
|
||||
self.assertEqual(dateformat.format(summertime, 'O'), u'+0200')
|
||||
self.assertEqual(dateformat.format(wintertime, 'I'), u'0')
|
||||
self.assertEqual(dateformat.format(wintertime, 'O'), u'+0100')
|
||||
|
||||
# Ticket #16924 -- We don't need timezone support to test this
|
||||
# 3h30m to the west of UTC
|
||||
tz = FixedOffset(-3*60 - 30)
|
||||
dt = datetime(2009, 5, 16, 5, 30, 30, tzinfo=tz)
|
||||
self.assertEqual(dateformat.format(dt, 'O'), u'-0330')
|
||||
|
||||
Reference in New Issue
Block a user