I think the output is the expected one. You are just changing the timezone and not the locality used to modify output. There is no way to modify the locality at the moment as far as I know.
Hi @Apachez ,
I have checked Time Zone setting on:
VyOS 1.4-rolling-202307060317
VyOS 1.4-rolling-202306280317
No problem found.
vyos@vyos# set system time-zone Europe/Stockholm
vyos@vyos# commit
vyos@vyos# exit
vyos@vyos:~$ show date
Tue Jul 11 07:31:21 AM CEST 2023
A system time zone must be specified, this can be done by either specifying the zone as Region/Location or as offset from UTC, the system’s default zone is GMT. When the Region/Location format is being used, daylight savings time (DST) adjustments are done automatically.
@Apachez many Linux based operation systems locale settings are currently set to a locale that specifies a 12-hour time format.
With typing locale we can view the current locale settings. Basically, all the locale settings are just environment variables, but there are some dependencies between them.
If we are using the default en_US.UTF-8 locale, then en_GB.UTF-8 would be the closest equivalent with 24-hour time representation. To set it, use:
localectl set-locale LC_TIME=en_GB.UTF-8
Then logout & log back in to have the change take effect in your session.
If you are unsure, you can test the output by specifying the desired locale as an environment variable for the date command:
Like:
LC_TIME=en_US.UTF-8 date Tue Jul 11 04:46:10 PM +04 2023
LC_TIME=en_GB.UTF-8 date Tue 11 Jul 16:46:14 +04 2023
I know how to set things in a linux box - done that for decades.
Problem here is that VyOS doesnt honor the selected timezone. As in when Europe/x is set then a 24h clock should be used instead of a 12h AM/PM clock.
Or if the VyOS team dont want to alter things in the background when a timezone is selected then the time-locate should have its own parameter to be set in config mode.
For example:
set system time-format 12h
vs.
set system time-format 24h
Default should be 24h due to ISO-standards. Would also match how many other routers/switches/firewalls out there by default displays current time.
One should NOT be forced to do things in the linux shell to make VyOS behave properly IMHO.