`QuerySet.dates()` is computed in UTC when time zone support is enabled
|Reported by:||aaugustin||Owned by:||aaugustin|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||kmike84@…, anssi.kaariainen@…, semente+django@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Aggregation on dates is performed in UTC (the database timezone) when settings.USE_TZ = True, while an end user may expect its current time zone to be taken into account. This is a known problem in the initial implementation of time zone support.
- the year, month, day, and week_day lookups,
- date_hierarchy in the admin,
- the date based generic views.