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

[feature] Select time format #77

Closed
wilriker opened this issue May 3, 2018 · 2 comments
Closed

[feature] Select time format #77

wilriker opened this issue May 3, 2018 · 2 comments

Comments

@wilriker
Copy link
Contributor

wilriker commented May 3, 2018

Currently times are displayed in 12h AM/PM format. It would be nice to have an option to change this to 24h format.

@chrishamm
Copy link
Collaborator

If you are talking about the end times then the formatting depends on your browser configuration. DWC uses the locale as configured in your browser so I suggest you change that and/or your system's formatting settings.

@wilriker
Copy link
Contributor Author

wilriker commented May 4, 2018

I talk basically about all times displayed in DWC, e.g. Last Modified columns in all file tables but also about end times.

My systems are configured to use en_DK.UTF-8 which is English language but European/ISO date and number formats. It works everywhere except with DWC. I also changed all settings in Vivaldi and Firefox to be only German but still I get all times in DWC formatted as AM/PM.

I tried running new Date().toLocaleString() in the console of the browser and interestingly this gives me exactly the format that I see in DWC. So here this might be an issue with my browser(s).

Still I think it would be nice to have an option to force date and time format to a specific value.

EDIT: I played around a little more with Date.prototype.toLocaleString() and at least on all of my systems (running Arch Linux and Vivaldi and Firefox as browser) this falls back to en-US when no argument is given to it. Though, when I use it in the form of new Date().toLocaleString(navigator.language) it at least honors my browser settings regarding language. I set it to en-GB for testing and this now produces a 24h time format. So maybe adding this argument to toLocaleString() might already fix my request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants