Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsoDateTimeFromToRangeFilterTests fail with DST #1050

Open
bmwiedemann opened this Issue Mar 5, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@bmwiedemann
Copy link

bmwiedemann commented Mar 5, 2019

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

======================================================================
FAIL: test_filtering (tests.test_filtering.IsoDateTimeFromToRangeFilterTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/abuild/rpmbuild/BUILD/django-filter-2.1.0/tests/test_filtering.py", line 1005, in test_filtering
    self.assertEqual(len(results.qs), 2)
AssertionError: 1 != 2

----------------------------------------------------------------------
Ran 487 tests in 0.981s

FAILED (failures=1, skipped=14, expected failures=3)

This bug was found while working on reproducible builds for openSUSE.

@bmwiedemann bmwiedemann changed the title IsoDateTimeToRangeFilterTests fail with DST IsoDateTimeFromToRangeFilterTests fail with DST Mar 5, 2019

@carltongibson

This comment has been minimized.

Copy link
Owner

carltongibson commented Mar 5, 2019

So is this a DST issue? Will it re-occur every year? (Can you propose a fix? 😉)

@bmwiedemann

This comment has been minimized.

Copy link
Author

bmwiedemann commented Mar 5, 2019

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...

@carltongibson

This comment has been minimized.

Copy link
Owner

carltongibson commented Mar 5, 2019

OK, thanks for the report. I will have a play at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.