diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/date/date.1 | 12 | ||||
-rw-r--r-- | bin/date/date.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1 index 6fbf8ce42eb..4f39ddd15db 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: date.1,v 1.7 1997/08/21 20:35:35 deraadt Exp $ +.\" $OpenBSD: date.1,v 1.8 1997/09/17 23:23:02 bri Exp $ .\" $NetBSD: date.1,v 1.12 1996/03/12 04:32:37 phil Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -50,7 +50,7 @@ .Op Fl t Ar minutes_west .Op Fl nu .Op Cm + Ns Ar format -.Op [[yy]yy[mm[dd[hh]]]]mm[\&.ss] +.Op [[[[[cc]yy]mm]dd]HH]MM[\&.SS] .Sh DESCRIPTION .Nm Date displays the current date and time when invoked without arguments. @@ -122,18 +122,18 @@ The canonical representation for setting the date and time is: .It Ar yy Year in abbreviated form (.e.g 89 for 1989, 06 for 2006). The format -.Ar yyyymmddhhmm +.Ar ccyymmddHHMM is also permitted, for non-ambiguous years beyond 1999. .It Ar mm Numeric month. A number from 1 to 12. .It Ar dd Day, a number from 1 to 31. -.It Ar hh +.It Ar HH Hour, a number from 0 to 23. -.It Ar mm +.It Ar MM Minutes, a number from 0 to 59. -.It Ar .ss +.It Ar .SS Seconds, a number from 0 to 61 (59 plus a maximum of two leap seconds). .El .Pp diff --git a/bin/date/date.c b/bin/date/date.c index 626b9c9a529..8b76d832c3e 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -1,4 +1,4 @@ -/* $OpenBSD: date.c,v 1.9 1997/09/16 13:40:14 deraadt Exp $ */ +/* $OpenBSD: date.c,v 1.10 1997/09/17 23:23:03 bri Exp $ */ /* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: date.c,v 1.9 1997/09/16 13:40:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: date.c,v 1.10 1997/09/17 23:23:03 bri Exp $"; #endif #endif /* not lint */ @@ -168,7 +168,7 @@ setthetime(p) lt = localtime(&tval); - if (dot != NULL) { /* .ss */ + if (dot != NULL) { /* .SS */ *dot++ = '\0'; if (strlen(dot) != 2) badformat(); @@ -204,12 +204,12 @@ setthetime(p) if (lt->tm_mday > 31) badformat(); /* FALLTHROUGH */ - case 4: /* hh */ + case 4: /* HH */ lt->tm_hour = ATOI2(p); if (lt->tm_hour > 23) badformat(); /* FALLTHROUGH */ - case 2: /* mm */ + case 2: /* MM */ lt->tm_min = ATOI2(p); if (lt->tm_min > 59) badformat(); @@ -251,6 +251,6 @@ usage() { (void)fprintf(stderr, "usage: date [-nu] [-d dst] [-r seconds] [-t west] [+format]\n"); - (void)fprintf(stderr, " [[[yy]yy[mm[dd[hh]]]]mm[.ss]]\n"); + (void)fprintf(stderr, " [[[[[[cc]yy]mm]dd]HH]MM[.SS]]\n"); exit(1); } |