date utility format unexpectedly changed after upgrade from bionic to focal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Release Notes for Ubuntu |
Triaged
|
Undecided
|
Unassigned | ||
coreutils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
After upgrading my Bionic system to Focal, I noticed a significant change in the output of the `date` utility. This could potentially cause regressions for those who are relying on a consistent date format when using `date` in shell scripts.
EXPECTED BEHAVIOR
=================
I expected to see the same date format that can be seen on Ubuntu releases (at least) from Trusty through Bionic:
$ date -u
Wed Jan 8 21:00:14 UTC 2020
ACTUAL BEHAVIOR
===============
On Focal (and Eoan) the following date format is seen by default:
$ date -u
Wed 08 Jan 2020 09:00:14 PM UTC
Note the differences in zero-padding, whitespace, placement of the year, and the extraneous "PM" (I had expected to see a 24-hour time).
FURTHER DETAILS
===============
This machine was originally on Bionic and has been upgraded to development releases between Bionic and Focal.
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
Changed in ubuntu-release-notes: | |
status: | New → Triaged |
Changed in coreutils (Ubuntu): | |
status: | New → Confirmed |
Locales are complicated and not my cup of tea ;)
Found this: https:/ /superuser. com/questions/ 1497422/ debian- 9-vs-debian- 10-different- date-output- the-same- locale- the-same- timezone
Another user noted the same change when going from debian 9 to debian 10. I honestly don't know if this is a bug, or if it's fixing a bug.
Since LC_TIME is set to en_US, maybe the new output in focal is fixing a bug, and using the US format?