From: Collin Funk Date: Tue, 4 Nov 2025 03:47:52 +0000 (-0800) Subject: doc: mention nanosecond decimal points with --iso-8601=ns X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1654bd8628a954fcf2637dca31b9ff077ba68e7f;p=thirdparty%2Fcoreutils.git doc: mention nanosecond decimal points with --iso-8601=ns Many people are used to seeing ISO 8601 dates using a period separating seconds and nanoseconds. This behavior seems to be worth documenting given the bug reports: https://bugs.gnu.org/63119 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118970 * doc/coreutils.texi (Options for date): Mention that 'date --iso-8601=ns' uses a comma as a separator, following the preference of ISO 8601. Give an example of how to get an ISO 8601 date with a period separator. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 13f9f9a468..012dd719eb 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -17181,6 +17181,11 @@ This is like the format @code{%Y-%m-%dT%H:%M:%S%:z}. @item ns Also print nanoseconds. This is like the format @code{%Y-%m-%dT%H:%M:%S,%N%:z}. + +GNU @command{date} uses a @samp{,} decimal point as preferred by ISO +8601. You can override it by expressing the full format with a @samp{.} +decimal point explicitly, like @code{LC_ALL=C date ++'%Y-%m-%dT%H:%M:%S.%N%:z'}. @end table @macro dateParseNote