-
Notifications
You must be signed in to change notification settings - Fork 30
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
24 hours instead of AM / PM #246
Comments
Hi again! Do you think you can add that switch to the settings e.g. in version 1.0.0 maybe? |
Hey, looks like the browser provides an internationalized date time formatting API https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat I think using this in https://github.com/garethgeorge/backrest/blob/main/webui/src/lib/formatting.ts#L20-L36 should be the right approach. |
Are you using docker? This tends to happen when the timezone in the container is incorrect. |
yep, that makes sense. i think the linuxserver containers use this in their compose but not sure if environment:
- TZ=US/East and the forgejo container mounts these volumes in compose: volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro |
Yep! For backrest I think just setting the TZ variable should be enough. It’s handled by the tzdata alpine package added to the docked image. |
89a49c1 updates the time formatting to use the locale. |
No, just the binary version on Arm64, AMD64 and Windows 10. |
Just released 1.0.0 which will try to use the locale from your browser, let me know if that's working for you. |
I have not changed anything else except the binary
|
I'm on docker. |
try clearing your browser cache. |
The setting is based on your browser's locale for time formatting. |
I see it now, but it does not make sense to me. I have my browser language set to US English but there's no place to define the regional settings. And in fact this is the only software I access in the browser where I see this behavior. If we define the TZ environment variable, Backrest should stick to that instead of the browser settings. |
I have a similar problem, the browser locale seems sometimes inconsistent. Yet on backrest its still AM and PM, it only works if I manually override the locale in the dev console. Then its in 24h. I guess its a minor issue and I am not sure if this is a browser bug or with backrest. |
I use Firefox and I don't find any setting to define the region, only the language. But I prefer the language set to English than to my mother language. |
Fore me it works as expected, so I can close this ticket. |
The WebUI shows date and time in 12 hours format:
2024-04-24 at 12:30:17 AM - ....
That is 0:30:17 in the morning. That confuses when in a hurry...
How can I switch to get the 24 hours format?
I'm using Backrest 0.17.2 on many different Linux and Windows systems as binary.
The text was updated successfully, but these errors were encountered: