carltongibson / django-filter

A generic system for filtering Django QuerySets based on user selections
https://django-filter.readthedocs.io/en/main/
Other
4.39k stars 760 forks source link

Why are we making DateRangeField timezone aware? #1659

Open Thutmose3 opened 2 months ago

Thutmose3 commented 2 months ago

Dates in Django do not have timezones, as they are just dates, only DateTime has this, which makes sence.

Here we make DateRangeField timezone aware: https://github.com/carltongibson/django-filter/blob/920a79ff401eb87946a2a6593bee767a7cfb2fa0/django_filters/fields.py#L42

Why is that? It's causing really strange behaviour.

And when removing the timezone code for this, all is good with any timezone i try.

Thutmose3 commented 2 months ago

I created a PR for this here: https://github.com/carltongibson/django-filter/pull/1660