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

Use timezone.now for model defaults #149

Merged
merged 1 commit into from May 24, 2016

Conversation

mythmon
Copy link
Contributor

@mythmon mythmon commented May 24, 2016

Without this I get things like

>>> from normandy.recipes.models import Approval
>>> from django.contrib.auth.models import User
>>> me = User.objects.get()
>>> a = Approval(creator=me)
>>> a.save()
/home/mythmon/src/normandy/normandy/venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1453:
RuntimeWarning: DateTimeField Approval.created received a naive datetime (2016-05-24 17:53:06.309489) while time zone support is active.

@rehandalal r?

@rehandalal
Copy link
Contributor

makes sense. r+

@rehandalal rehandalal merged commit 506c0a0 into mozilla:master May 24, 2016
@mythmon mythmon deleted the timezone-datetimes branch August 16, 2016 21:31
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.

None yet

2 participants