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?
@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