django-url-filter
django-url-filter copied to clipboard
UTC datetimes in the database queried against the
If TIME_ZONE is set to America/New_York, USE_TZ is set to True, and this field is in the database:
{
"id": 1,
"time": "2019-08-31T20:28:42-04:00"
}
?time__hour=16 will return the field, but ?time__hour=20 will not. Although this behavior is correct, because the hour is 16 in America/New_York, this is confusing for users. Perhaps adding the timezone as an optional parameter to datetime queries would be useful.