#17262 closed Cleanup/optimization (fixed)
Refactor the implementations of tzinfo classes
Reported by: | Aymeric Augustin | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Utilities | Version: | 1.4 |
Severity: | Normal | Keywords: | timezone tzinfo |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Since the merge of the time zone support branch, django.utils.tzinfo
and django.utils.timezone
provide subtly different implementations of a tzinfo subclass representing local time.
The reason is explained at the bottom of this message. In short, the former is used for display and focuses on robustness; the latter is used for time zone support and focuses on correctness.
I think django.utils.tzinfo
should be refactored and merged into django.utils.timezone
, but that's probably not doable in a totally backwards-compatible fashion.
Change History (7)
comment:1 by , 13 years ago
Keywords: | timezone tzinfo added |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Component: | Core (Other) → Utilities |
---|
comment:4 by , 11 years ago
Has patch: | set |
---|---|
Version: | → 1.4 |
Pull request: https://github.com/django/django/pull/1601
Discussion: https://groups.google.com/d/msg/django-developers/zwQju7hbG78/jxpGZfdlxlcJ
I'll merge this in a few days, unless the discussion on django-developers reveals some good reasons not to.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
See also #18766.