diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-14 02:04:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-14 02:04:59 +0000 |
commit | cd0bac66d702f918bebf9e667ebd36a6d5f841a1 (patch) | |
tree | 04312d3eb78bc40ed68f4cc5103e1ae71047d370 /usr.bin | |
parent | edba9ae736e00fcb975c5d3455ee9018e2b307f0 (diff) |
fix time spec even better; emmf26@umr.edu
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/last/last.1 | 6 | ||||
-rw-r--r-- | usr.bin/last/last.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/last/last.1 b/usr.bin/last/last.1 index 4be275d5cd0..685b1ab00bd 100644 --- a/usr.bin/last/last.1 +++ b/usr.bin/last/last.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: last.1,v 1.18 2000/12/17 21:33:01 millert Exp $ +.\" $OpenBSD: last.1,v 1.19 2003/04/14 02:04:58 deraadt Exp $ .\" $NetBSD: last.1,v 1.3 1994/12/21 22:41:23 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -47,7 +47,7 @@ .Op Fl f Ar file .Op Fl h Ar host .Op Fl t Ar tty -.Op Fl d Ar [[CC]YY][MMDD]hhmm[.SS] +.Op Fl d Ar [[[CC]YY]MMDD]hhmm[.SS] .Op Ar user ... .Sh DESCRIPTION The @@ -111,7 +111,7 @@ and .Fl n are ignored. The argument should be in the form -.Dq [[CC]YY][MMDD]hhmm[.SS] +.Dq [[[CC]YY]MMDD]hhmm[.SS] where each pair of letters represents the following: .Pp .Bl -tag -width Ds -compact -offset indent diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 07c0c2cabad..ca0b9f9ab11 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -1,4 +1,4 @@ -/* $OpenBSD: last.c,v 1.22 2003/04/06 18:40:14 deraadt Exp $ */ +/* $OpenBSD: last.c,v 1.23 2003/04/14 02:04:58 deraadt Exp $ */ /* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: last.c,v 1.22 2003/04/06 18:40:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: last.c,v 1.23 2003/04/14 02:04:58 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -567,7 +567,7 @@ ttyconv(arg) /* * dateconv -- * Convert the snapshot time in command line given in the format - * [[CC]YY][MMDD]hhmm[.SS]] to a time_t. + * [[[CC]YY]MMDD]hhmm[.SS]] to a time_t. * Derived from atime_arg1() in usr.bin/touch/touch.c */ time_t @@ -585,7 +585,7 @@ dateconv(arg) if ((t = localtime(&timet)) == NULL) err(1, "localtime"); - /* [[CC]YY][MMDD]hhmm[.SS] */ + /* [[[CC]YY]MMDD]hhmm[.SS] */ if ((p = strchr(arg, '.')) == NULL) t->tm_sec = 0; /* Seconds defaults to 0. */ else { @@ -633,7 +633,7 @@ dateconv(arg) timet = mktime(t); if (timet == -1) terr: errx(1, - "out of range or illegal time specification: [[CC]YY][MMDD]hhmm[.SS]"); + "out of range or illegal time specification: [[[CC]YY[MMDD]hhmm[.SS]"); return (timet); } @@ -663,6 +663,6 @@ usage(void) fprintf(stderr, "usage: %s [-#] [-csT] [-f file] [-t tty] [-h host]" - " [-d [[CC]YY][MMDD]hhmm[.SS]] [user ...]\n", __progname); + " [-d [[[CC]YY]MMDD]hhmm[.SS]] [user ...]\n", __progname); exit(1); } |