]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: mention nanosecond decimal points with --iso-8601=ns
authorCollin Funk <collin.funk1@gmail.com>
Tue, 4 Nov 2025 03:47:52 +0000 (19:47 -0800)
committerPádraig Brady <P@draigBrady.com>
Wed, 5 Nov 2025 14:18:38 +0000 (14:18 +0000)
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

index 13f9f9a4683e6353f300ffc51eca226f0d915145..012dd719eb2967b4b399a7d5cf84959e62e27a52 100644 (file)
@@ -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