[Django] #35430: Documentation about timezone is misleading

18 views
Skip to first unread message

Django

unread,
May 4, 2024, 8:22:00 AMMay 4
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
-----------------------------------------+------------------------
Reporter: younes-chaoui | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Official documentation says :
{{{
When support for time zones is enabled, Django stores datetime information
in UTC in the database, uses time-zone-aware datetime objects internally,
and translates them to the end user’s time zone in templates and forms.
}}}

This is not True. In templates (including admin panel), Django uses
TIME_ZONE setting instead of end user's timezone.
--
Ticket URL: <https://code.djangoproject.com/ticket/35430>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 4, 2024, 8:51:43 AMMay 4
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
--------------------------------------+------------------------------------
Reporter: younes-chaoui | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 5.0
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 Sarah Boyce):

* component: Uncategorized => Documentation
* easy: 0 => 1
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization

Comment:

Yes thank you!
This is clearer further down in the "Time zone aware input in forms" and
"Time zone aware output in templates" section.
I recommend that `end user's time zone` is updated to {{{:ref:`default
current time zone <default-current-time-zone>`}}} here.
--
Ticket URL: <https://code.djangoproject.com/ticket/35430#comment:1>

Django

unread,
May 7, 2024, 1:52:57 AMMay 7
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
--------------------------------------+------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.0
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 い。):

* owner: nobody => い。
* status: new => assigned

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

Django

unread,
May 7, 2024, 2:09:10 AMMay 7
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
--------------------------------------+------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.0
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 い。):

* has_patch: 0 => 1

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

Django

unread,
May 7, 2024, 2:12:49 AMMay 7
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
--------------------------------------+------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.0
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
--------------------------------------+------------------------------------
Comment (by い。):

Hello,

This is my first contribution to this project, and I'm excited to be a
part of this community. I've submitted a pull request to address the issue
detailed in ticket #35430, aiming to correct the documentation regarding
time zone handling in Django. I would appreciate any feedback or
suggestions for improvement as I'm eager to learn and contribute
effectively. Thank you for reviewing my changes!

Best regards,
username: koupro0204
https://github.com/django/django/pull/18138
--
Ticket URL: <https://code.djangoproject.com/ticket/35430#comment:4>

Django

unread,
May 7, 2024, 5:37:14 AMMay 7
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
--------------------------------------+------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

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

Django

unread,
May 7, 2024, 6:10:18 AMMay 7
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
--------------------------------------+------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.0
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 Sarah Boyce):

* needs_better_patch: 1 => 0

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

Django

unread,
May 23, 2024, 4:46:43 AM (11 days ago) May 23
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
-------------------------------------+-------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 5.0
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 Sarah Boyce):

* stage: Accepted => Ready for checkin

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

Django

unread,
May 23, 2024, 6:35:30 AM (11 days ago) May 23
to django-...@googlegroups.com
#35430: Documentation about timezone is misleading
-------------------------------------+-------------------------------------
Reporter: younes-chaoui | Owner: い。
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 5.0
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 Sarah Boyce <42296566+sarahboyce@…>):

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

Comment:

In [changeset:"718ed69751c9b3923ffa99ce000e733c8350d0a6" 718ed69]:
{{{#!CommitTicketReference repository=""
revision="718ed69751c9b3923ffa99ce000e733c8350d0a6"
Fixed #35430 -- Corrected docs on timezone conversion in templates.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35430#comment:8>
Reply all
Reply to author
Forward
0 new messages