Skip to content Skip to sidebar Skip to footer

Django - Query (month/day) Filter Only Works When Use_tz = False

How can I get the 'latest_events_list' query below to work with day/month? The below query only works if USE_TZ = False in settings.py. When I set USE_TZ = True, it doesn't query a

Solution 1:

As Gocht helped mention in his comment above:

My MySQL server timezone needed to be in UTC time zone.

In addition, for those looking to change server time zone - be sure to restart the server or else changes may not take place.

Cheers

Post a Comment for "Django - Query (month/day) Filter Only Works When Use_tz = False"