Opened 12 years ago

Closed 11 years ago

Last modified 9 years ago

#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 Preston Holmes, 12 years ago

Keywords: timezone tzinfo added
Triage Stage: UnreviewedAccepted

comment:2 by Aymeric Augustin, 12 years ago

See also #18766.

comment:3 by Aymeric Augustin, 11 years ago

Component: Core (Other)Utilities

comment:4 by Aymeric Augustin, 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 Aymeric Augustin <aymeric.augustin@…>, 11 years ago

Resolution: fixed
Status: newclosed

In ec2778b445546f624d3b3a1f2118e751b10bb2e7:

Fixed #17262 -- Refactored tzinfo implementations.

This commit deprecates django.utils.tzinfo in favor of the more recent
django.utils.timezone which was introduced when Django gained support
for time zones.

comment:6 by Aymeric Augustin <aymeric.augustin@…>, 11 years ago

In d9413d33b2a8371731a92289123683cf6f440290:

Refactored code and tests that relied on django.utils.tzinfo.

Refs #17262.

comment:7 by Tim Graham <timograham@…>, 9 years ago

In 1b0365ad34151f266fe3faecb4edf31a51a8642c:

Removed django.utils.tzinfo per deprecation timeline; refs #17262.

Note: See TracTickets for help on using tickets.
Back to Top