summaryrefslogtreecommitdiffstats
path: root/bin/date
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1996-12-14 05:54:15 +0000
committersteve <steve@FreeBSD.org>1996-12-14 05:54:15 +0000
commite3fc14f8685fe763615d8ecf98fc75a105b3e7fa (patch)
tree7a90881b9be76d449b83a7335b97212d5c270ef2 /bin/date
parent78e21244f4320b39d29f1831a9cbadcc24312997 (diff)
downloadFreeBSD-src-e3fc14f8685fe763615d8ecf98fc75a105b3e7fa.zip
FreeBSD-src-e3fc14f8685fe763615d8ecf98fc75a105b3e7fa.tar.gz
Merge Lite2 mods, fix incorrect default string, cleanup
use of .Nm macros, and -Wall cleaning.
Diffstat (limited to 'bin/date')
-rw-r--r--bin/date/date.119
-rw-r--r--bin/date/date.c6
-rw-r--r--bin/date/netdate.c4
3 files changed, 16 insertions, 13 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1
index fc59a4d..84e4e17 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -32,8 +32,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)date.1 8.2 (Berkeley) 11/17/93
-.\" $Id: date.1,v 1.7 1996/03/12 05:30:39 nate Exp $
+.\" @(#)date.1 8.3 (Berkeley) 4/28/95
+.\" $Id: date.1,v 1.8 1996/08/29 18:05:45 wosch Exp $
.\"
.Dd November 17, 1993
.Dt DATE 1
@@ -50,7 +50,7 @@
.Op Cm + Ns Ar format
.Op [yy[mm[dd[hh]]]]mm[\&.ss]
.Sh DESCRIPTION
-.Nm Date
+.Nm
displays the current date and time when invoked without arguments.
Providing arguments will format the date and time in a user-defined
way or set the date.
@@ -105,9 +105,11 @@ The format string may contain any of the conversion specifications described
in the
.Xr strftime 3
manual page, as well as any arbitrary text.
+A <newline> character is always output after the characters specified by
+the format string.
The format string for the default display is:
.Bd -literal -offset indent
-``%+''.
+``+%+''
.Ed
.Pp
If an operand does not have a leading plus sign, it is interpreted as
@@ -137,7 +139,7 @@ and years are handled automatically.
.Sh EXAMPLES
The command:
.Bd -literal -offset indent
-date ``+DATE: %m/%d/%y%nTIME: %H:%M:%S%n''
+date ``+DATE: %m/%d/%y%nTIME: %H:%M:%S''
.Ed
.Pp
will display:
@@ -162,9 +164,10 @@ date 1432
sets the time to
.Li "2:32 PM" ,
without modifying the date.
-.Sh ENVIRONMENTAL VARIABLES
-The following environment variables affect the execution of
-.Nm date :
+.Sh ENVIRONMENT VARIABLES
+The execution of
+.Nm
+is affected by the following evironment variables:
.Bl -tag -width Ds
.It Ev TZ
The timezone to use when displaying dates.
diff --git a/bin/date/date.c b/bin/date/date.c
index 12261be..eaefc46 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -30,17 +30,17 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: date.c,v 1.6 1995/10/23 20:26:53 ache Exp $
+ * $Id: date.c,v 1.7 1996/04/06 01:42:09 ache Exp $
*/
#ifndef lint
-static char copyright[] =
+static char const copyright[] =
"@(#) Copyright (c) 1985, 1987, 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)date.c 8.1 (Berkeley) 5/31/93";
+static char const sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/param.h>
diff --git a/bin/date/netdate.c b/bin/date/netdate.c
index 0f12aae..f6c298b 100644
--- a/bin/date/netdate.c
+++ b/bin/date/netdate.c
@@ -30,11 +30,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: netdate.c,v 1.2 1994/09/24 02:54:38 davidg Exp $
+ * $Id: netdate.c,v 1.3 1995/05/30 00:06:41 rgrimes Exp $
*/
#ifndef lint
-static char sccsid[] = "@(#)netdate.c 8.1 (Berkeley) 5/31/93";
+static char const sccsid[] = "@(#)netdate.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
#include <sys/param.h>
OpenPOWER on IntegriCloud