[Fixed]-Correctly saved timezone aware datetime object appearing timezone unaware when accessed in Django app

1👍

Use timezone.now() instead of datetime.now():

from django.utils import timezone
timezone.now()

To get now() either with or without timezone globally for the whole app (including PostgreSQL schema updates). With or without time zone depends on the USE_TZ setting.

Leave a comment