Is there really no way to use US or GB locale on Debian together with proper international standard ISO 8601 date/time notation in English?
@solarchemist What do you get with en_GB.utf-8 and en_UK.utf-8 ?? I don't know what command you are running after setting the locale.
(Note: I suspect it won't work, but thought I'd ask in case someone else wonders the same thing)
@ColinTheMathmo It's a good idea, but I don't have any en_UK.utf-8 locale (Ubuntu 18.04). I have tried en_GB.utf-8 though, and that gave a conventionally British formatted date-time string.
For anyone else interested in the nitty-gritty, I have written down my current locale settings as an Ansible role
https://codeberg.org/ansible/locales
@solarchemist There's UTC.
@AmpBenzScientist UTC is a timezone, and timezone comprises just a small part of the full date-time string, which is governed by the system locale settings.
Most Linux distrubutions manage this using the `locale` program.
This program allows the user (or sysadmin) to use different locales for date/time strings, messages, etc., or the same locale for everything.
It's not as technical as it sounds, and I don't mean to scare anyone off. Plus, I'm hardly a professional myself.
I appreciate you taking the time to comment, though, makes it feel less lonely here in cyberspace ;-)
I can expand a little on this subject.
The target is a date-time string complying with ISO 8601, like "2021-07-16 23:19".
Of the around 20 English-language locales on Ubuntu, the following appeared promising (I compared them to countries listed to support ISO 8601 on Wikipedia):
en_DK.UTF-8 displays as "16/07/2021, 23.19"
en_SG.UTF-8 displays as "16/7/21, 11:19 pm"
en_CA.UTF-8 displays as "2021-07-16, 11:19 pm"
en_ZA.UTF-8 displays as "2021/07/16, 23:19"
The two last ones are closest, but still deviate with the slashes, the comma, and the am/pm notation.
Does anyone know of a way to have English locale with ISO 8601 date-time?
BTW, this is doable if we allow other languages than English, e.g., by setting LC_TIME=sv_SE.UTF-8. But then weekdays and months are in Swedish. Of course, I'm Swedish, but does the English-language Linux world really not have ISO 8601 support?