-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display dates in local time #142
Comments
Signed-off-by: Thomas Druez <[email protected]>
@cco3 Summary of changes about "dates" in latest version:
|
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
By "The current timezone", do you mean the timezone specified in the settings? Why not just let the client display the time according to the local timezone? |
Yes, Django allows to specify the timezone of the server, not to get the timezone for each clients. The dates are always stored as UTC in the database and displayed using the server defined timezone (
If by "local timezone" you mean "client timezone" rather than "server timezone", how would you get that information from the client? |
The server serves up UTC. The client then displays it according to the local timezone (i.e., using javascript). Unfortunately the standard javascript time functions are very inconsistent across browsers, but there are libraries commonly used to fix that. |
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
why geo when value can be set directly in the settings? |
@lf32 Thank you for the excellent research! See also https://docs.djangoproject.com/en/4.0/topics/i18n/timezones/#template-tags @cco3 Would be changing the setting be enough for you? |
@pombredanne Thank you, I'll check them |
The Web UI currently displays thing like the "Created time", etc. using UTC time, but it might make sense to use local time or both UTC and local time.
(I was having trouble figuring out which scan I was looking at..."was this the one I started at 8:00 or at 11:00?")
The text was updated successfully, but these errors were encountered: