Admin Now and Today buttons use confusing time / timezone
|Reported by:||imfletcher||Owned by:||aaugustin|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The Django Admin has the default Today and Now buttons for datetime fields.
These seem to use the local time, but store it as UTC in the db without converting it. Meaning, if its 10PM local time, the Now button will populate with 22:00 but will store as 22:00 +0:00:00. This is confusing as it makes it very hard to understand what is going on.
It would be better if the buttons used UTC's current date/time and stored as such, or use the default timezone and store the appropriate offset.
PS sorry if dupe, i tried searching but admin, today, and now are hard terms to search on.
Change History (22)
comment:1 Changed 9 months ago by aaugustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:9 Changed 9 months ago by loic84
- Easy pickings set
- Has patch set
- Needs documentation set
- Needs tests set
- Patch needs improvement set
comment:10 Changed 9 months ago by aaugustin
- Owner changed from nobody to aaugustin
- Status changed from new to assigned
comment:20 Changed 8 months ago by Aymeric Augustin <aymeric.augustin@…>
- Resolution set to fixed
- Status changed from assigned to closed
comment:21 Changed 8 months ago by aaugustin
- Triage Stage changed from Accepted to Ready for checkin