Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history: add timezone support #789

Closed
b1rger opened this issue Apr 16, 2024 · 0 comments · Fixed by #791 or #792
Closed

history: add timezone support #789

b1rger opened this issue Apr 16, 2024 · 0 comments · Fixed by #791 or #792
Assignees

Comments

@b1rger
Copy link
Contributor

b1rger commented Apr 16, 2024

Saving an entity without explicitly setting a history date gives a warning:

/usr/local/lib/python3.11/site-packages/django/db/models/fields/__init__.py:1595: RuntimeWarning: DateTimeField VersionPerson.history_date received a naive datetime (2024-04-16 10:43:27.944208) while time zone support is active.

https://stackoverflow.com/questions/18622007/runtimewarning-datetimefield-received-a-naive-datetime says:

In places where you were using datetime.now, change it to timezone.now, and add from django.utils import timezone at the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants