Open bmwiedemann opened 5 years ago
So is this a DST issue? Will it re-occur every year? (Can you propose a fix? 😉)
Yes, it is a DST issue and it re-occurs every year. I looked at the code, but since I'm not a python expert and relevant code is distributed across multiple files and classes, it was not easy to see where the problem comes from. Maybe pdb could show things...
OK, thanks for the report. I will have a play at some point.
OK, so this just showed up here: https://travis-ci.org/carltongibson/django-filter/builds/514228812 Happily take a PR. If not I'll look at it at DjangoCon Europe sprints.
Ran 489 tests in 1.354s
FAILED (skipped=14, expected failures=3, unexpected successes=1) Destroying test database for alias 'default'...
We'll need to revisit this after #1463.
Look into rewriting the test using @adamchainz's time-machine project
I think you could just decorate the test with:
@time_machine.travel(dt.datetime(2019, 3, 10, 7))
or similar, and the test will always run outside of DST.
That’s what I’m looking for. 😄
One test starts to fail 2019-03-10 08:00 UTC This coincides with a US DST 2019-03-10 02:00 (-0600) test works again after end of DST ~ 2019-11-04
This bug was found while working on reproducible builds for openSUSE.