diff options
author | Yarden Shoham <git@yardenshoham.com> | 2024-01-02 02:25:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 02:25:30 +0100 |
commit | cdc33b29a012e61b42f192d79f9486fa8e21b2ed (patch) | |
tree | 12e779fa67cbc257c888814e9c6056a0208db1bc /custom | |
parent | [skip ci] Updated translations via Crowdin (diff) | |
download | forgejo-cdc33b29a012e61b42f192d79f9486fa8e21b2ed.tar.xz forgejo-cdc33b29a012e61b42f192d79f9486fa8e21b2ed.zip |
Add global setting how timestamps should be rendered (#28657)
- Resolves https://github.com/go-gitea/gitea/issues/22493
- Related to https://github.com/go-gitea/gitea/issues/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>
Diffstat (limited to 'custom')
-rw-r--r-- | custom/conf/app.example.ini | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 08f2e0d63f..d58309f141 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1244,6 +1244,10 @@ LEVEL = Info ;; Change the sort type of the explore pages. ;; Default is "recentupdate", but you also have "alphabetically", "reverselastlogin", "newest", "oldest". ;EXPLORE_PAGING_DEFAULT_SORT = recentupdate +;; +;; The tense all timestamps should be rendered in. Possible values are `absolute` time (i.e. 1970-01-01, 11:59) and `mixed`. +;; `mixed` means most timestamps are rendered in relative time (i.e. 2 days ago). +;PREFERRED_TIMESTAMP_TENSE = mixed ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |