From 1654bd8628a954fcf2637dca31b9ff077ba68e7f Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 3 Nov 2025 19:47:52 -0800 Subject: [PATCH] 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. --- doc/coreutils.texi | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.47.3