﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30749	Admin date_hierarchy filter by month of October 2019 does not include October 31th when TZ is set to Europe/Paris (UTC+2)	yab	nobody	"Steps to reproduces: 
- set USE_TZ = True and TIME_ZONE = 'Europe/Paris' in settings
- use sqlite db
- Create a model (Event) with a datefield
- Create modelAdmin (EventAdmin) with date_hierarchy on that datefield
- Create an Event on 2019-10-31 (or 2018-10-31)
- Filter by date_hierarchy on Admin list page : it does not include that Event.

Probably linked to the fact that the DST in Paris is in october (Sunday 2019-10-27) while in others Timezones it is in November (Sunday 2019-03-11).
Bug maybe due to pytz ? 
Bug maybe due to the way date_hierarchy calculates date range in django/contrib/admin/views/main.py (lines 164-167)
{{{
                elif month:
                    # In this branch, from_date will always be the first of a
                    # month, so advancing 32 days gives the next month.
                    to_date = (from_date + timedelta(days=32)).replace(day=1)
}}}

can be uncorrectly fixed by setting:
{{{
 to_date = (from_date + timedelta(days=32, hours = XXX)).replace(day=1)
}}}
where XXX = 3 (or something like that)"	Bug	closed	contrib.admin	2.2	Normal	duplicate	timezone daylight saving time		Unreviewed	0	0	0	0	0	0
