wikimedia-france/macommune

[nightly_update] Naive datetime warning

Ash-Crow opened this issue · 0 comments

When the nightly_update runs for the first time, it shows a warning that the datetime set for updated is naive (doesn't have a timezone):

/[venv-path]/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1447: RuntimeWarning: DateTimeField Communes.updated received a naive datetime (2017-07-28 14:33:25.109110) while time zone support is active.
  RuntimeWarning)
/[venv-path]/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1447: RuntimeWarning: DateTimeField Communes.updated received a naive datetime (2017-07-28 14:33:25.120042) while time zone support is active.

But the datetime is set by django.utils.timezone.now() which has a timezone: "2017-07-28 14:33:25.106361+00:00".