diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-09-25 17:08:31 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-09-25 17:08:31 +0000 |
| commit | 3ef1762cb9f6495c89a5258461cbd9bcbc250557 (patch) | |
| tree | 91f37208539305dabe42c7751509774c9c46ff28 /tests | |
| parent | 482388cd61ee97d8898097fb6777c5d7ca4216af (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/utils/dateformat.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/utils/dateformat.py b/tests/regressiontests/utils/dateformat.py index b678fa0093..f1ef720b20 100644 --- a/tests/regressiontests/utils/dateformat.py +++ b/tests/regressiontests/utils/dateformat.py @@ -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') |
