Skip to content
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

add preference setting for commit time display format #4520

Open
msongz opened this issue Jul 26, 2018 · 5 comments
Open

add preference setting for commit time display format #4520

msongz opened this issue Jul 26, 2018 · 5 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@msongz
Copy link

msongz commented Jul 26, 2018

a little suggestion:

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

@lafriks lafriks added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 26, 2018
@lafriks
Copy link
Member

lafriks commented Jul 26, 2018

This should probably go to user settings

@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Jan 16, 2019
@typeless
Copy link
Contributor

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.

@stale stale bot removed the issue/stale label Jan 25, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Feb 7, 2019
@aa956
Copy link

aa956 commented 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
Copy link

aa956 commented 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

lunny pushed a commit that referenced this issue Jan 2, 2024
- Resolves #22493
- Related to #4520

Some admins prefer all timestamps to display the full date instead of
relative time. They can do that now by setting

```ini
[ui]
PREFERRED_TIMESTAMP_TENSE = absolute
```

This setting is set to `mixed` by default, allowing dates to render as
"5 hours ago". Here are some screenshots of the UI with this setting set
to `absolute`:

![image](https://github.com/go-gitea/gitea/assets/20454870/f496457f-6afa-44be-a1e7-249ee5fe0706)

![image](https://github.com/go-gitea/gitea/assets/20454870/c03b14f5-063d-4e13-9780-76ab002d76a9)

![image](https://github.com/go-gitea/gitea/assets/20454870/f4b34e28-1546-4374-9199-c43348844edd)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: delvh <dev.lh@web.de>
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
- Resolves go-gitea#22493
- Related to go-gitea#4520

Some admins prefer all timestamps to display the full date instead of
relative time. They can do that now by setting

```ini
[ui]
PREFERRED_TIMESTAMP_TENSE = absolute
```

This setting is set to `mixed` by default, allowing dates to render as
"5 hours ago". Here are some screenshots of the UI with this setting set
to `absolute`:

![image](https://github.com/go-gitea/gitea/assets/20454870/f496457f-6afa-44be-a1e7-249ee5fe0706)

![image](https://github.com/go-gitea/gitea/assets/20454870/c03b14f5-063d-4e13-9780-76ab002d76a9)

![image](https://github.com/go-gitea/gitea/assets/20454870/f4b34e28-1546-4374-9199-c43348844edd)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: delvh <dev.lh@web.de>
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
- Resolves go-gitea#22493
- Related to go-gitea#4520

Some admins prefer all timestamps to display the full date instead of
relative time. They can do that now by setting

```ini
[ui]
PREFERRED_TIMESTAMP_TENSE = absolute
```

This setting is set to `mixed` by default, allowing dates to render as
"5 hours ago". Here are some screenshots of the UI with this setting set
to `absolute`:

![image](https://github.com/go-gitea/gitea/assets/20454870/f496457f-6afa-44be-a1e7-249ee5fe0706)

![image](https://github.com/go-gitea/gitea/assets/20454870/c03b14f5-063d-4e13-9780-76ab002d76a9)

![image](https://github.com/go-gitea/gitea/assets/20454870/f4b34e28-1546-4374-9199-c43348844edd)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: delvh <dev.lh@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
5 participants