Debian Bug report logs - #1034858
coreutils: pr: date format is %F %R always, must be %b %e %H:%M %Y if LC_TIME=C

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <[email protected]>; Source for coreutils is src:coreutils (PTS, buildd, popcon).

Reported by: наб <[email protected]>

Date: Tue, 25 Apr 2023 21:21:02 UTC

Severity: normal

Found in version coreutils/9.1-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Michael Stone <[email protected]>:
Bug#1034858; Package coreutils. (Tue, 25 Apr 2023 21:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to наб <[email protected]>:
New Bug report received and forwarded. Copy sent to Michael Stone <[email protected]>. (Tue, 25 Apr 2023 21:21:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: наб <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: coreutils: pr: date format is %F %R always, must be %b %e %H:%M %Y if LC_TIME=C
Date: Tue, 25 Apr 2023 23:19:15 +0200
[Message part 1 (text/plain, inline)]
Package: coreutils
Version: 8.32-4+b1
Version: 9.1-1
Severity: normal

Dear Maintainer,

Quoth Issue 8 Draft 2.1 (unchanged for a long time),
XCU, pr, STDOUT:
-- >8 --
104141  In the POSIX locale, the <output of date> field, representing the date and time of last modification
104142  of the input file (or the current date and time if the input file is standard input), shall be
104143  equivalent to the output of the following command as it would appear if executed at the given
104144  time:
104145  date "+%b %e %H:%M %Y"
104146  without the trailing <newline>, if the page being written is from standard input. If the page
104147  being written is not from standard input, in the POSIX locale, the same format shall be used, but
104148  the time used shall be the modification time of the file corresponding to file instead of the current
104149  time. When the LC_TIME locale category is not set to the POSIX locale, a different format and
104150  order of presentation of this field may be used.
-- >8 --
RATIONALE:
-- >8 --
104203  The <output of date> field in the −l format is specified only for the POSIX locale. As noted, the
104204  format can be different in other locales. No mechanism for defining this is present in this volume
104205  of POSIX.1-202x, as the appropriate vehicle is a message catalog; that is, the format should be
104206  specified as a ``message’’.
-- >8 --
(the -l thing appears to be an error).

Why, then:
-- >8 --
$ echo  | pr -f


2023-04-25 23:16                                                  Page 1




$ echo  | LC_ALL=C pr -f


2023-04-25 23:16                                                  Page 1




$ echo  | LC_ALL=POSIX pr -f


2023-04-25 23:16                                                  Page 1




-- >8 --

This is just like who, except this works in coreutils who.

Best,
наб

-- System Information:
Debian Release: 12.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: amd64, i386

Kernel: Linux 6.1.0-2-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages coreutils depends on:
ii  libacl1      2.3.1-3
ii  libattr1     1:2.5.1-4
ii  libc6        2.36-9
ii  libgmp10     2:6.2.1+dfsg1-1.1
ii  libselinux1  3.4-1+b5

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:44:06 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.