aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCollin Funk <collin.funk1@gmail.com>2025-11-03 19:47:52 -0800
committerPádraig Brady <P@draigBrady.com>2025-11-05 14:18:38 +0000
commit1654bd8628a954fcf2637dca31b9ff077ba68e7f (patch)
tree32f992d97fb7e344165db422156f174467afc37d
parentmaint: adjust lseek_copy to handle non zero offsets (diff)
downloadcoreutils-1654bd8628a954fcf2637dca31b9ff077ba68e7f.tar.gz
coreutils-1654bd8628a954fcf2637dca31b9ff077ba68e7f.zip
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.
-rw-r--r--doc/coreutils.texi5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 13f9f9a46..012dd719e 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