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

net: Make datetime objects timezone aware #291

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

XePeleato
Copy link
Contributor

I am receiving very frequent:
/usr/local/lib/python3.10/dist-packages/django/db/models/fields/__init__.py:1654: RuntimeWarning: DateTimeField ProcessSubmissions.watchdog received a naive datetime (2024-01-30 11:07:38.550017) while time zone support is active.
warnings.

According to Django docs (https://django.readthedocs.io/en/stable/topics/i18n/timezones.html), this is the correct way to convert them.

It shouldn't make a mess with an existing database, as Django converts those anyway.

@dstndstn
Copy link
Owner

Thanks for this!

@dstndstn dstndstn merged commit 673394b into dstndstn:main Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants