Subject: bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

From: James Feeney <[email-masked]>
Date: Tue, 19 Aug 2025 09:13:05 -0600

Hey Pádraig

On Mon, 2025-08-18 at 10:26 +0100, Pádraig Brady wrote:
> tag 79261 notabug
> close 79261
> stop
> 
> ...
> 
> I think you missed the "PM" in the output above.
> 
> cheers,
> Pádraig

Yes, that's it, along with the coincidence that MDT relative to UTC is exactly 12 hours.  Thanks for pointing-out the glaringly obvious in retrospect.

Reviewing the `man 1 date` page, and after some trial and error:
----
$ date -uR
Tue, 19 Aug 2025 14:35:50 +0000
----

I did also resort to "time format 24 hours on shell with date command":
https://askubuntu.com/questions/1238397/ubuntu-server-20-04-time-format-24-hours-on-shell-with-date-command

which comments that:
----
24-hour clock in en_US locale was a bug in glibc locale definition and has been corrected in this commit. So, the change was intentional. – 
Mateusz
Commented May 14, 2020 at 19:29
----

referencing:
https://sourceware.org/git/?p=glibc.git;a=commit;h=7395f3a0efad9fc51bb54fa383ef6524702e0c49

----
en_US: define date_fmt (bug 24046)
author	Aurelien Jarno <[email-masked]>	
	Sun, 30 Dec 2018 17:29:53 -0600 (00:29 +0100)

The en_US locale use a 12h am/pm format in both d_fmt and d_t_fmt, which is correct, but does not define date_fmt. This causes the default value to be used, which is in 24h format.
----

Apparently, I do not use the date command often enough to have appreciated this "misfeature" applied to the `date` command six years ago - of course, coupled with not being able to properly read what is printed on the screen.

There is another comment, which expresses well my opinion on the matter:
----
I don't know why the 24-hours format has to have anything to do with "Great Britain" or "United States". –
Yan King Yin
Commented Dec 19, 2022 at 7:16
----

Still, thanks for the hand-holding.

James