Admin's date_hierarchy excludes 31 october when using timezone with DST in northern hemisphere.
https://code.djangoproject.com/ticket/28933 introduced a subtle bug where it accidentally excludes 31 october in the admin date_hierarchy filter after selecting october. The underlying reason is that the generated sql has < 2019-10-31
as opposed to < 2019-11-01
as it should be. This in turn is caused by applying the timezone for 2019-10-01 (with DST in countries in the northern hemisphere) to the date used for 2019-11-01. This causes the date conversion to actually operate on 2019-10-31 23:00 instead of 2019-11-01 00:00. It's a bit hard to explain in words, PR incoming that hopefully explains better in code.
Change History
(11)
Owner: |
changed from nobody to Erwin Junge
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Accepted
|
Triage Stage: |
Accepted → Unreviewed
|
Summary: |
admin date_hierarchy excludes 31 october when using timezone with DST in northern hemisphere → Admin's date_hierarchy excludes 31 october when using timezone with DST in northern hemisphere.
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Uncategorized → Bug
|
Version: |
2.2 → master
|
Resolution: |
→ duplicate
|
Status: |
assigned → closed
|
Resolution: |
duplicate
|
Status: |
closed → new
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
https://github.com/django/django/pull/11983