aboutsummaryrefslogtreecommitdiff
path: root/bin/date/date.1
diff options
context:
space:
mode:
Diffstat (limited to 'bin/date/date.1')
-rw-r--r--bin/date/date.128
1 files changed, 22 insertions, 6 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1
index bf7c961314a2..88974e27d5a4 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -31,7 +31,7 @@
.\"
.\" @(#)date.1 8.3 (Berkeley) 4/28/95
.\"
-.Dd May 19, 2023
+.Dd April 26, 2024
.Dt DATE 1
.Os
.Sh NAME
@@ -143,17 +143,19 @@ values are
.Cm date ,
.Cm hours ,
.Cm minutes ,
+.Cm seconds ,
and
-.Cm seconds .
+.Cm ns No Pq for nanoseconds .
The date and time is formatted to the specified precision.
When
.Ar FMT
is
.Cm hours
-(or the more precise
-.Cm minutes
+.Po or the more precise
+.Cm minutes ,
+.Cm seconds ,
or
-.Cm seconds ) ,
+.Cm ns Pc ,
the
.St -iso8601
format includes the timezone.
@@ -327,7 +329,9 @@ which specifies the format in which to display the date and time.
The format string may contain any of the conversion specifications
described in the
.Xr strftime 3
-manual page, as well as any arbitrary text.
+manual page and
+.Ql %N
+for nanoseconds, as well as any arbitrary text.
A newline
.Pq Ql \en
character is always output after the characters specified by
@@ -553,6 +557,7 @@ prints:
and exits with status 1.
.Sh SEE ALSO
.Xr locale 1 ,
+.Xr clock_gettime 2 ,
.Xr gettimeofday 2 ,
.Xr getutxent 3 ,
.Xr strftime 3 ,
@@ -583,6 +588,12 @@ The format selected by the
.Fl I
flag is compatible with
.St -iso8601 .
+.Pp
+The
+.Ql %N
+conversion specification for nanoseconds is a non-standard extension.
+It is compatible with GNU date's
+.Ql %N .
.Sh HISTORY
A
.Nm
@@ -601,3 +612,8 @@ The
.Fl I
flag was added in
.Fx 12.0 .
+.Pp
+The
+.Ql %N
+conversion specification was added in
+.Fx 15.0 .