<p>The Django lookup <code>date</code> will convert the field to the <code>TIME_ZONE</code> setting if <code>USE_TZ = True</code> 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:</p>
<p><code>date_in_utc = Author.objects.first().created.date()
posts = Post.objects.filter(created__date=date_in_utc)</code></p>
By clicking “Accept all”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and assist in our marketing efforts. Check our privacy policies.