#17263 closed Cleanup/optimization (fixed)
When time zone support is active, raise a warning when a naive datetime reaches the database adapter
Reported by: | Aymeric Augustin | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | |
Severity: | Release blocker | Keywords: | |
Cc: | anssi.kaariainen@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I haven't done it because I thought it would be too obnoxious -- for instance, if you're using a third-party app that uses datetimes in a non-trivial way and hasn't been upgraded yet.
But a good argument in favor of such a warning was made on the mailing list, and it's easy to filter the warning out with one line in your settings file if you don't care.
Attachments (1)
Change History (7)
comment:1 by , 13 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Design decision needed → Accepted |
comment:2 by , 13 years ago
Cc: | added |
---|
comment:3 by , 13 years ago
Adding this warning shows that Django still uses naive datetimes in many places, including the cache framework, the date based generic views, the "auth" and "comments" contrib apps.
by , 13 years ago
Attachment: | 17263.patch added |
---|
Agreed, and in fact I think we should ensure this gets in for 1.4, so that we can mention it in the upgrading notes, therefore making it a release blocker.