Hi David,
David Chmelik <[email protected]> writes:
> I'm British-American and lived on both sides of Atlantic, so consider
> American time/date format the world's worst. ISO date is good, but
> not as specific. I'd like to be able for my OSs date command to
> output in standard format like (for today): 'Thu 30 Apr 13:00:00 PDT
> 2026' by default, i.e. put day, month, year in ascending order, which
> should be doable with something such as a coreutils.conf or date.conf
> rather than typing (not worth the time) or overloading/aliasing (not
> good if I have the reason to display it another way).
You are using GNU/Linux, I assume? We use the format specified by
'locale date_fmt' there, so you can just use locales to do this:
$ LC_ALL=en_US.UTF-8 date -d '2026-04-30T13:00'
Thu Apr 30 01:00:00 PM PDT 2026
$ LC_ALL=en_GB.UTF-8 date -d '2026-04-30T13:00'
Thu 30 Apr 13:00:00 PDT 2026
You can define a shell function in one of your startup files for this:
date ()
{
LC_TIME=en_GB.UTF-8 command date "$@"
}
Using LC_TIME means that your error messages and such will still be in
American English, if that is what you prefer.
Collin