add preference setting for commit time display format #2100

Open
opened 2025-11-02 04:24:10 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @msongz on GitHub (Jul 26, 2018).

a little suggestion:

so far the commit time display relatively
which I want the commit time display absolutely

Originally created by @msongz on GitHub (Jul 26, 2018). a little suggestion: so far the commit time display relatively which I want the commit time display absolutely
GiteaMirror added the issue/confirmedtype/feature labels 2025-11-02 04:24:10 -06:00
Author
Owner

@lafriks commented on GitHub (Jul 26, 2018):

This should probably go to user settings

@lafriks commented on GitHub (Jul 26, 2018): This should probably go to user settings
Author
Owner

@stale[bot] commented on GitHub (Jan 16, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 16, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@typeless commented on GitHub (Jan 25, 2019):

I happened to need this yesterday when a bug reported by one of our customers said that the bug didn't exist before a specific date. I tried to navigate the history of the commits in front of my colleagues, but it was embarrassingly not much helpful. So, I had to turn to the good old console for git log.

@typeless commented on GitHub (Jan 25, 2019): I happened to need this yesterday when a bug reported by one of our customers said that the bug didn't exist before a specific date. I tried to navigate the history of the commits in front of my colleagues, but it was embarrassingly not much helpful. So, I had to turn to the good old console for `git log`.
Author
Owner

@aa956 commented on GitHub (Dec 22, 2022):

Still relevant. Client side bookmarklet workaround:

javascript:function datestamp(){for (elem of $('span.time-since')) {elem.textContent = elem.attributes["data-content"].value };} datestamp();

Source: https://discourse.gitea.io/t/how-to-change-date-format/2099/10

@aa956 commented on GitHub (Dec 22, 2022): Still relevant. Client side bookmarklet workaround: ```js javascript:function datestamp(){for (elem of $('span.time-since')) {elem.textContent = elem.attributes["data-content"].value };} datestamp(); ``` Source: https://discourse.gitea.io/t/how-to-change-date-format/2099/10
Author
Owner

@aa956 commented on GitHub (Oct 4, 2023):

Still relevant. Client side bookmarklet workaround:

Update for relative-time-element:

javascript:function datestamp(){for (elem of $('relative-time')) {elem.setAttribute("format", "datetime");elem.setAttribute("year", "numeric");elem.setAttribute("hour", "numeric");elem.setAttribute("minute", "numeric");elem.setAttribute("second", "numeric");elem.setAttribute("month", "2-digit");elem.setAttribute("day", "2-digit");elem.setAttribute("weekday", "");elem.setAttribute("lang", "en-SE");};} datestamp();

lang set to en-SE to allow for yyyy-mm-dd date format, not sure how valid it is in HTML?

It works in Firefox:

image

@aa956 commented on GitHub (Oct 4, 2023): > Still relevant. Client side bookmarklet workaround: Update for [relative-time-element](https://github.com/github/relative-time-element): ```js javascript:function datestamp(){for (elem of $('relative-time')) {elem.setAttribute("format", "datetime");elem.setAttribute("year", "numeric");elem.setAttribute("hour", "numeric");elem.setAttribute("minute", "numeric");elem.setAttribute("second", "numeric");elem.setAttribute("month", "2-digit");elem.setAttribute("day", "2-digit");elem.setAttribute("weekday", "");elem.setAttribute("lang", "en-SE");};} datestamp(); ``` `lang` set to `en-SE` to allow for yyyy-mm-dd date format, not sure how valid it is in HTML? It works in Firefox: ![image](https://github.com/go-gitea/gitea/assets/27946957/2d8ee04e-d1b6-4637-9914-c3118e36614a)
Author
Owner

@kg4zow commented on GitHub (Aug 3, 2025):

+1

@kg4zow commented on GitHub (Aug 3, 2025): +1
Author
Owner

@lunny commented on GitHub (Aug 3, 2025):

This should be resolved by #28657

@lunny commented on GitHub (Aug 3, 2025): This should be resolved by #28657
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2100