With pytz installed:
{{{
======================================================================
FAIL: test_datetime_with_local_tzinfo
(utils_tests.test_dateformat.DateFormatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\project\django\django\tests\utils_tests\test_dateformat.py",
line 38, in test_datetime_with_local_tzinfo
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))),
dt.replace(tzinfo=None))
AssertionError: datetime.datetime(2009, 5, 15, 23, 30, 30) !=
datetime.datetime(2009, 5, 16, 5, 30, 30)
======================================================================
FAIL: test_datetime_with_tzinfo
(utils_tests.test_dateformat.DateFormatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\project\django\django\tests\utils_tests\test_dateformat.py",
line 47, in test_datetime_with_tzinfo
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))),
dt.astimezone(ltz).replace(tzinfo=None))
AssertionError: datetime.datetime(2009, 5, 15, 23, 30, 30) !=
datetime.datetime(2009, 5, 16, 5, 30, 30)
----------------------------------------------------------------------
Ran 13 tests in 0.134s
FAILED (failures=2)
}}}
With pytz uninstalled:
{{{
Creating test database for alias 'default'...
Creating test database for alias 'other'...
.............
----------------------------------------------------------------------
Ran 13 tests in 0.013s
OK
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21756>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Broken by d9413d33b2a8371731a92289123683cf6f440290 from #17262
--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:1>
* keywords: => timezone tzinfo
* component: Testing framework => Utilities
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Marking my own ticket as accepted and a release blocker because it's a
bisected regression.
--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:2>
* owner: nobody => aaugustin
* status: new => assigned
Comment:
It's probably just a matter of skipping these tests, Windows can't use a
time zone other than the system time zone.
--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:3>
Comment (by aaugustin):
Affected tests use 'Europe/Copenhagen', which is the same as
'Europe/Paris'; that's why I didn't notice the issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9cc3371a0f45894de12d2fb60a57afd111fb9c3e"]:
{{{
#!CommitTicketReference repository=""
revision="9cc3371a0f45894de12d2fb60a57afd111fb9c3e"
Fixed #21756 -- Skipped two timezone-related tests on Windows.
Windows cannot use a time zone other than the default time zone.
Thanks manfre for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:5>