Local time zone in timestamps #6494

Closed
opened 2025-11-02 06:57:39 -06:00 by GiteaMirror · 15 comments
Owner

Originally created by @mozoh on GitHub (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 https://github.com/go-gitea/gitea/issues/6004, but seems like it is being reproduced again.

Screenshots

image

Originally created by @mozoh on GitHub (Dec 10, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.14.0+dev-260-g7bc0c8cff - Git version: ? - Operating system: docker <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) https://try.gitea.io/explore/repos - [ ] No - Log gist: n/a <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description Popup timestamps are always in UTC, but not browser timezone wherever I am. There is a closed issue about this https://github.com/go-gitea/gitea/issues/6004, but seems like it is being reproduced again. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/42132525/101715894-dec41b00-3ace-11eb-9ce0-e4f3442b8a09.png)
GiteaMirror added the type/proposaltopic/ui labels 2025-11-02 06:57:39 -06:00
Author
Owner

@zeripath commented on GitHub (Dec 11, 2020):

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

@zeripath commented on GitHub (Dec 11, 2020): Paging @silverwind - is it possible recent changes to js have broken this?
Author
Owner

@silverwind commented on GitHub (Dec 11, 2020):

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.

@silverwind commented on GitHub (Dec 11, 2020): 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.
Author
Owner

@Colin5887 commented on GitHub (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.

@Colin5887 commented on GitHub (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](https://user-images.githubusercontent.com/30656548/101957930-7ef87c00-3c56-11eb-8e06-528d33c7cafd.png) BTW, I'm at AEDT.
Author
Owner

@lunny commented on GitHub (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.

@lunny commented on GitHub (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.
Author
Owner

@Colin5887 commented on GitHub (Jan 1, 2021):

@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 commented on GitHub (Jan 1, 2021): @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.
Author
Owner

@Colin5887 commented on GitHub (Jan 1, 2021):

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

I mean, the table:
image

@Colin5887 commented on GitHub (Jan 1, 2021): @lunny The problem is not the time in the text format but the table. I mean, the table: ![image](https://user-images.githubusercontent.com/30656548/103447101-da101280-4cda-11eb-8af9-b8fe78a9c665.png)
Author
Owner

@lunny commented on GitHub (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.

@lunny commented on GitHub (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.
Author
Owner

@Colin5887 commented on GitHub (Jan 2, 2021):

@lunny Thanks, a new issue is created here: https://github.com/go-gitea/gitea/issues/14215

@Colin5887 commented on GitHub (Jan 2, 2021): @lunny Thanks, a new issue is created here: https://github.com/go-gitea/gitea/issues/14215
Author
Owner

@mozoh commented on GitHub (Jan 2, 2021):

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

@mozoh commented on GitHub (Jan 2, 2021): Why the issue has been closed? "Change timezone on server” is not the real solution.
Author
Owner

@lunny commented on GitHub (Jan 2, 2021):

@mozoh see my reply https://github.com/go-gitea/gitea/issues/13925#issuecomment-753341604

@lunny commented on GitHub (Jan 2, 2021): @mozoh see my reply https://github.com/go-gitea/gitea/issues/13925#issuecomment-753341604
Author
Owner

@mozoh commented on GitHub (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.

@mozoh commented on GitHub (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.
Author
Owner

@silverwind commented on GitHub (Jan 3, 2021):

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).

@silverwind commented on GitHub (Jan 3, 2021): 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).
Author
Owner

@noerw commented on GitHub (Jan 9, 2021):

this similar to / the same as #6087

@noerw commented on GitHub (Jan 9, 2021): this similar to / the same as #6087
Author
Owner

@lunny commented on GitHub (Jan 11, 2021):

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

@lunny commented on GitHub (Jan 11, 2021): #6087 is for heatmap, this one is the time on feeds .
Author
Owner

@yardenshoham commented on GitHub (Apr 29, 2023):

Fixed by #23988

@yardenshoham commented on GitHub (Apr 29, 2023): Fixed by #23988
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6494