Opened 2 years ago
Last modified 2 years ago
#33810 closed Bug
Admin "now" time very strange — at Version 1
Reported by: | Michael | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 4.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The current time where I am is 00:25
In Javascript it prints:
> new Date() Tue Jun 28 2022 00:25:07 GMT+0200 (South Africa Standard Time)
On the linux server running Django (a different computer to my browser):
$ date Tue 28 Jun 2022 12:25:48 AM SAST
But in the Django admin if I click the now of a date/time widget it adds:
2022-06-27 17:26:23 Note: You are 7 hours ahead of server time.
It says I am 7 hours ahead, but my computer is set to SAST as well.
This is my timezone settings (using Django==4.0.1, with zoneinfo):
# SAST = South African Standard Time is GMT+2 USE_TZ = True TIME_ZONE = 'Africa/Johannesburg'
I see there was work on this issue about a decade ago. Not sure where the wonky "now" time is coming from.
Note:
See TracTickets
for help on using tickets.