Everytime a user logs in, I see
RuntimeWarning: DateTimeField received a naive datetime (...) while time zone support is active.
in Apache logs.
This is because the naive datetime.datetime.now() is used to get time. django.utils.timezone.now() respects USE_TZ setting to produce a naive or timezone-aware time for storing in the database.
Additionally, I removed now() from all logging calls, because time is an essential property of log record.
Everytime a user logs in, I see
RuntimeWarning: DateTimeField received a naive datetime (...) while time zone support is active.
in Apache logs. This is because the naivedatetime.datetime.now()
is used to get time.django.utils.timezone.now()
respectsUSE_TZ
setting to produce a naive or timezone-aware time for storing in the database.Additionally, I removed now() from all logging calls, because time is an essential property of log record.