1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-09 10:11:34 +02:00

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.
This commit is contained in:
Collin Funk
2025-11-03 19:47:52 -08:00
committed by Pádraig Brady
parent 4c0cf3864a
commit 1654bd8628
+5
View 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