Lessons Learned

contact@vinta.com.br

The Django lookup date will convert the field to the TIME_ZONE setting if USE_TZ = True before get the date and compare. So be careful when you get a date from the DB, which it's in UTC, and do something like:

date_in_utc = Author.objects.first().created.date()
posts = Post.objects.filter(created__date=date_in_utc)
Did you like?
1