Skip to content

Local time zone in timestamps #13925

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

Closed
2 of 6 tasks
mozoh opened this issue Dec 10, 2020 · 15 comments
Closed
2 of 6 tasks

Local time zone in timestamps #13925

mozoh opened this issue Dec 10, 2020 · 15 comments
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@mozoh
Copy link

mozoh commented Dec 10, 2020

  • Gitea version (or commit ref): 1.14.0+dev-260-g7bc0c8cff
  • Git version: ?
  • Operating system: docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist: n/a

Description

Popup timestamps are always in UTC, but not browser timezone wherever I am.
There is a closed issue about this #6004, but seems like it is being reproduced again.

Screenshots

image

@a1012112796 a1012112796 added the topic/ui Change the appearance of the Gitea UI label Dec 10, 2020
@zeripath
Copy link
Contributor

Paging @silverwind - is it possible recent changes to js have broken this?

@silverwind
Copy link
Member

No, I've never touched those. I remember suggesting them to be converted in JS to browser timezone but I think @lunny persisted that they should render in the server timezone.

@Colin5887
Copy link

Colin5887 commented Dec 11, 2020

I've tested 1.9.0, 1.10.0, 1.11.0 and 1.12.0. They all have the same issue. This is also reproducible in https://try.gitea.io

Here: I create a repo 4 minutes ago and it's marked to be an operation yesterday.
image

BTW, I'm at AEDT.

@lunny
Copy link
Member

lunny commented Jan 1, 2021

See https://docs.gitea.io/en-us/config-cheat-sheet/#time-time . You can change the default time zone and even the format which will be displayed on UI.

@Colin5887
Copy link

@lunny I promise I change that and it works......partially works.

It only changes the time when the mouse hovers on the commit and the time IS correct now.
However, the table of contributions is still incorrect. A commit made at 9:30 is still marked as yesterday's work.
It is reproducible on https://try.gitea.io as well.

@Colin5887
Copy link

@lunny The problem is not the time in the text format but the table.

I mean, the table:
image

@lunny
Copy link
Member

lunny commented Jan 2, 2021

@Colin5887 Your problem is not the same as this one. I think you can create a new issue so that we can track that.

@Colin5887
Copy link

@lunny Thanks, a new issue is created here: #14215

@lunny lunny closed this as completed Jan 2, 2021
@lunny lunny removed the type/bug label Jan 2, 2021
@mozoh
Copy link
Author

mozoh commented Jan 2, 2021

Why the issue has been closed? "Change timezone on server” is not the real solution.

@lunny
Copy link
Member

lunny commented Jan 2, 2021

@mozoh see my reply #13925 (comment)

@mozoh
Copy link
Author

mozoh commented Jan 2, 2021

@lunny your reply is about changing default, but not for local timezone. Every client can have its own timezone, different from the server. So, there will no solution for this as i understand.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jan 2, 2021
@lunny lunny reopened this Jan 2, 2021
@silverwind
Copy link
Member

Yes, we need some JS that runs during page load that converts timestamp to local. Should probably be inline so wrong timestamps never even render (can't put it in the main js bundle because that takes time to load).

@noerw
Copy link
Member

noerw commented Jan 9, 2021

this similar to / the same as #6087

@lunny
Copy link
Member

lunny commented Jan 11, 2021

#6087 is for heatmap, this one is the time on feeds .

@yardenshoham
Copy link
Member

Fixed by #23988

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

8 participants