[Django] #32739: Enable timezone handling by default (USE_TZ=True in global settings)

26 views
Skip to first unread message

Django

unread,
May 11, 2021, 3:36:14 AM5/11/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
------------------------------------------------+------------------------
Reporter: Claude Paroz | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
As using timezones is a recommended good practice by
[https://docs.djangoproject.com/en/2.2/topics/i18n/timezones/#overview the
docs], I think we should set `USE_TZ=True` in `global_settings.py`.

This will also allow to remove a setting from the default project settings
template.

To achieve that, we'll have to add a warning during the deprecation period
when we detect USE_TZ is not overridden in project settings.

--
Ticket URL: <https://code.djangoproject.com/ticket/32739>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 11, 2021, 3:51:19 AM5/11/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
--------------------------------------+------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

OK, yes — 10 years should be long enough 😀 +1.

--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:1>

Django

unread,
May 11, 2021, 4:01:29 AM5/11/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
--------------------------------------+------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz):

We might even think of *always* activating timezones (middle-term goal?),
but I don't have in mind all possible consequences of such a move.

--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:2>

Django

unread,
May 14, 2021, 10:10:05 AM5/14/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
--------------------------------------+------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14399 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:3>

Django

unread,
May 17, 2021, 1:11:48 AM5/17/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
Type: | Paroz
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Claude Paroz
* needs_docs: 0 => 1
* status: new => assigned
* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:4>

Django

unread,
May 17, 2021, 7:55:26 AM5/17/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
Type: | Paroz
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* needs_docs: 1 => 0
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:5>

Django

unread,
May 18, 2021, 2:33:38 AM5/18/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
Type: | Paroz
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:6>

Django

unread,
May 18, 2021, 3:06:19 PM5/18/21
to django-...@googlegroups.com
#32739: Enable timezone handling by default (USE_TZ=True in global settings)
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
Type: | Paroz
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"8cd55021bcb6c9727c1adccd9623fa4acfc0312b" 8cd55021]:
{{{
Fixed #32379 -- Started deprecation toward changing default USE_TZ to
True.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32739#comment:7>

Reply all
Reply to author
Forward
0 new messages