Opened 2 weeks ago
Last modified 11 days ago
#35430 assigned Cleanup/optimization
Documentation about timezone is misleading
Reported by: | younes-chaoui | Owned by: | い。 |
---|---|---|---|
Component: | Documentation | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
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.
Change History (6)
comment:1 by , 2 weeks ago
Component: | Uncategorized → Documentation |
---|---|
Easy pickings: | set |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 11 days ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 11 days ago
Has patch: | set |
---|
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
comment:5 by , 11 days ago
Patch needs improvement: | set |
---|
comment:6 by , 11 days ago
Patch needs improvement: | unset |
---|
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.