GNU bug report logs - #75208
Please mention "date %D considered harmful" in manpage

Previous Next

Package: coreutils;

Reported by: Tim Connors <reportbug <at> rather.puzzling.org>

Date: Mon, 30 Dec 2024 18:30:03 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75208 in the body.
You can then email your comments to 75208 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

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


Report forwarded to bug-coreutils <at> gnu.org:
bug#75208; Package coreutils. (Mon, 30 Dec 2024 18:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tim Connors <reportbug <at> rather.puzzling.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 30 Dec 2024 18:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tim Connors <reportbug <at> rather.puzzling.org>
To: bug-coreutils <at> gnu.org
Subject: Please mention "date %D considered harmful" in manpage
Date: Tue, 31 Dec 2024 00:14:07 +1100 (AEDT)
America is the only country to use %m/%d/%y.  Since American programmers
seem to assume its a good format to use in their scripts (after all, the
manpage states: "%D: date"), it would be a good idea if the man/infopage
came with a big fat warning like: "%D is considered harmful because for
the vast majority of people on the planet, it will be confusing to read
for most of the year, but is completely ambiguous for the first 12 days of
each month and could be interpreted as %d/%m/%y or %m/%d/%y -- most of the
world have traditionally interpreted dates as %d/%m/%y, but most are
moving to %Y/%m/%d which is unambiguously understood everywhere.  Use
something like `date --rfc-3339=date' or +%Y/%m/%d if you wish to uniquely
identify a date, which has the bonus of sorting trivially".


(There is a metric buttload of system software out there using date +%D,
such as debian's checksecurity, that should never have been encouraged to
assume that they could give the user a locale-ised date because of the
existence of the nice handy "%D" shortcut; the mere existence of something
that claims "%D: date" would lead you to assume it was safe and encouraged
to use!)


-- 
Tim Connors




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 30 Dec 2024 19:57:02 GMT) Full text and rfc822 format available.

Notification sent to Tim Connors <reportbug <at> rather.puzzling.org>:
bug acknowledged by developer. (Mon, 30 Dec 2024 19:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 75208-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Tim Connors <reportbug <at> rather.puzzling.org>
Cc: 75208-done <at> debbugs.gnu.org
Subject: Re: bug#75208: Please mention "date %D considered harmful" in manpage
Date: Mon, 30 Dec 2024 11:56:39 -0800
[Message part 1 (text/plain, inline)]
Thanks for the suggestion. I installed the attached. Although it doesn't 
go quite as far as your suggestion, it should adequately warn people who 
pay attention to warnings.
[0001-date-improve-doc-for-ambiguous-formats.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Jan 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.