Time format setting



  • Currently the time format is presented in 12h AM/PM format. It would be nice to make this user-selectable to be alternatively in 24h format.

    I already created https://github.com/chrishamm/DuetWebControl/issues/77 for this because I only discovered this wishlist afterwards.


  • administrators

    Where are you seeing AM/PM format? On my printers I see (and have always seen) 24-hour format. Maybe it depends on your operating system localisation settings.



  • I basically have all times in DWC formatted as 12h AM/PM format.

    My system is running Arch Linux with locale set to en_DK.UTF-8 which usually means English display language with European/ISO date and number formats. And that is working great everywhere except DWC.

    My browsers (Vivaldi and for testing this also Firefox) are set to either de-DE or en-GB. As I already posted in the Github issue it seems to be a problem with Date.toLocaleString() falling back to en-US in all of my browsers when there is no additional argument to this function. When I run new Date().toLocaleString(navigator.language) in the console I get a date/time format that fits to my language/locale setting(s). This is true for both Vivaldi and Firefox.

    I will try to switch my systems locale temporarily to see if this makes a difference.

    EDIT: When changing my system's locale to en_GB.UTF-8 I get time format in 24h at least in Vivaldi (which is set to en-GB, de-DE, de and en-US - in this order). Firefox will still show me AM/PM although this is even set to de-DE only in its language settings.



  • Either way, there already is a setting to select the language (which I am very happy about because even though I am a native German I prefer my applications to be in English), so it would be nice to also have a setting for date/time format.


  • administrators

    @wilriker said in Time format setting:

    EDIT: When changing my system's locale to en_GB.UTF-8 I get time format in 24h at least in Vivaldi (which is set to en-GB, de-DE, de and en-US - in this order). Firefox will still show me AM/PM although this is even set to de-DE only in its language settings.

    Isn't the time format localisation setting in your OS separate from the language/keyboard localisation?



  • @dc42 said in Time format setting:

    Isn't the time format localisation setting in your OS separate from the language/keyboard localisation?

    Keyboard is definitely separate.
    Language and date/time/number format usually come together in the locale. There are ways to override them separately but I feel it a bit too much to reconfigure all of my systems just to have DWC display the time in the format all other applications already do it without any overrides. 😕


  • administrators

    I use Arch as well and AFAICT there's an LC_TIME variable in /etc/locale.conf. If you change that and run locale-gen as root, it ought to update your date format. To be fair I see the same effect on my machine since I'm running it with an English locale, but running "date" in a console does print the right format. So I suspect the underlying problem is in the browser and hence I won't fix it.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.