Add a user preference to show times in 12h or 24h format
What does this MR do and why?
Add a user preference to override implicit time formatting based on locale to be either 12 or 24-hour/iso time format. This MR is based on #15206 (closed).
This is automatically applied anywhere getTimeago
from app/assets/javascripts/lib/utils/datetime/timeago_utility.js
is being used. This results in a number of places currently using hardcoded time format strings being uneffected by the setting.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Visit user preferences
http://127.0.0.1:3000/-/profile/preferences
- Activate
Show 24-hour format instead of 12-hour
and deactivateUse relative times
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #15206 (closed)
Edited by Thorben Westerhuys