aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn W. De Boskey <jwd@FreeBSD.org>2000-07-22 22:08:39 +0000
committerJohn W. De Boskey <jwd@FreeBSD.org>2000-07-22 22:08:39 +0000
commitb4a3a0382742b0eb0bf032c20b6a2346e8bf1958 (patch)
treef3ed166594c4ad599873d391699923e13d4a0fbf
parent37658206071deeb36a6f52b94c19f694bffb8171 (diff)
Notes
-rw-r--r--bin/date/date.12
-rw-r--r--bin/date/date.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1
index 91bc198fee25..d9d7d705b95c 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -122,7 +122,7 @@ is the number of seconds since the Epoch
00:00:00 UTC, January 1, 1970;
see
.Xr time 3
-.Pc .
+.Pc and can be specified in decimal, octal, or hex.
.It Fl t Ar minutes_west
Set the system's value for minutes west of
.Tn GMT .
diff --git a/bin/date/date.c b/bin/date/date.c
index 0ee69b775cb6..95d0baea623c 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -116,7 +116,8 @@ main(argc, argv)
break;
case 'r': /* user specified seconds */
rflag = 1;
- tval = atol(optarg);
+ if (sscanf(optarg,"%li",&tval) != 1)
+ usage();
break;
case 't': /* minutes west of UTC */
/* error check; don't allow "PST" */