I can’t ever remember changing the format. Just as a test I created a test user and logged into usermin and dates fine its using the aussie format for date. Not sure why you system would be different, maybe someone on @staff might know.
And globally for all users, it can be changed in Webmin ⇾ Usermin Configuration: Usermin Module Configuration / Read Mail / Default user preferences page:
Thanks Ilia, Usermin and Webmin are already set that way, but still it displays as MM/DD/YY
The only fix I have found is per user, Login to webmail /Usermin / Usermin / Change Language / set Locale to Manual, then select English (Australia).
Messy for sure.
Per Domain in Virtualmin, Administration Options / Switch to Server’s Admin / Virtual Server Details / Webmin Modules / Change Language and Theme / set Locale to Manual and then select English (Australia)
Still messy, but then also works for new users in that domain. Previously created users don’t appear to be affected, but I have done so many tests I am getting a bit confuddled!
Eitherway, if Usermin could just read the Locale from the server OS - which it may be doing on eg Centos 7 that Stefan uses, it would save a lot of messing about for me, and probably other people if it is an RHEL9 issue.
Agreed, ideally we need to centralize that. And I already tried to do that by putting this all under single Change Language and Theme page to control for a user and to Webmin (Usermin) Configuration: Language and Locale page to set it globally for all users. This isn’t that bad.
But I almost completely forgotten that mail has its own date format options for some reason … Probably @Jamie could explain the reason behind it better, and/or remove those completely to rely only on whatever is defined on Webmin side (or Usermin side).
Could it be that I need to make a change at the OS level?
Not sure what you mean exactly … but the main obstacle is that we have two separate date formats (technically).
The old one is when the date generated on the server side, in the server executed scripts, which never reach/output to UI. In this case, it’s controlled by Server generated date format option in Locale configuration / Manual … the old location for this date control feature was Webmin (Usermin) Configuration: User Interface page, i.e. raw dateformat option. This old feature is not very flexible in providing locale based formatted date/time.
The new one, that happens on the theme side, which only receives the timestamp from the server, and process it in UI according to finesse user preferences. It’s much more flexible and powerful.
The best solution would be is to pre-process date/time solely on the server side. But that would require a lot of work (on Perl side) to support different formats and locales. This is not trivial. Actually, it’s like a separate project on its own.
I am trying to work out why Stefan doesn’t have this issue with Centos 7, so I spun up a clean minimal C7 server and installed Vmin - same problem!
When installing C7 (and any RHEL etc) I always make a point of selecting English (Australia) and then setting the timezone to my city in the install process.
Prior and after VMin install and Wizard, localectl status shows:
System Locale: LANG=en_AU.UTF-8
VC Keymap: us
X11 Layout: us
Then both Webmin and Usermin are set to use DD/MM/YYY but they then display in US format.
Webmin status screen, Recent Logins - MM/DD/YYY - so it’s not just mail.
It appears that Webmin and Vmin are ignoring all the settings, the only way to deal with it is by changing Language and Themes by setting Locale to Manual and then selecting English (Australia)
I have now tried with Centos 7 and RHEL 8 & 9, so it’s not an OS version issue.
Stefan, any thoughts why your C7 works and my fresh new C7 doesn’t?
Ilia, can you make the xMin family read the locale and not just the language, and why do the programs ignore being set to use DD/MM/YYY?
I would personally loved to remove all extra code, and solely rely on localectl output and build human readable dates/time on the server side.
As writing this, and looking at the code I remembered that we already do/have something familiar to this (i.e. respect/pass browser defined language/locale to process dates/time). There is an option called acceptlang which is controlled in UI on Webmin ⇾ Webmin Configuration: Language and Locale page with Use language specified by browser? option. So, if you set it to Yes and your browser language is set to English (Australia) (or whatever) then the whole UI will use that language and display dates accordingly too.
I wouldn’t mind dropping completely date/time processing on UI side and use DateTime::Locale instead. @Jamie, it would require rework on Webmin side – how do you feel about that?
I tried this in Firefox, closest option was English GB which fixed the Wemin System Information, Recent Logins, but didn’t appear to change anything in Virtualmin.