Subject: Please mention "date %D considered harmful" in manpage
From: Tim Connors <[email-masked]>
To: [email-masked]
Date: Tue, 31 Dec 2024 00:14:07 +1100 (AEDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

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