Module Name:    src
Committed By:   wiz
Date:           Tue May 10 05:37:33 UTC 2022

Modified Files:
        src/bin/date: date.1

Log Message:
date(1): add example for how to get seconds since the Epoch output


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/bin/date/date.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/date/date.1
diff -u src/bin/date/date.1:1.47 src/bin/date/date.1:1.48
--- src/bin/date/date.1:1.47	Sat Jan 27 18:59:38 2018
+++ src/bin/date/date.1	Tue May 10 05:37:33 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: date.1,v 1.47 2018/01/27 18:59:38 wiz Exp $
+.\"	$NetBSD: date.1,v 1.48 2022/05/10 05:37:33 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"     @(#)date.1	8.3 (Berkeley) 4/28/95
 .\"
-.Dd January 25, 2018
+.Dd May 10, 2022
 .Dt DATE 1
 .Os
 .Sh NAME
@@ -61,7 +61,7 @@ way or set the date.
 Only the superuser may set the date.
 .Pp
 The options are as follows:
-.Bl -tag -width Ds
+.Bl -tag -width 12n
 .It Fl a
 Use
 .Xr adjtime 2
@@ -215,6 +215,13 @@ date 1432
 sets the time to
 .Li "2:32 PM" ,
 without modifying the date.
+.Pp
+The command:
+.Bd -literal -offset -indent
+date +%s
+.Ed
+.Pp
+prints the current time as seconds since the Epoch.
 .Sh DIAGNOSTICS
 Exit status is 0 on success, 1 if unable to set the date, and 2
 if able to set the local date, but unable to set it globally.

Reply via email to