diff options
author | bde <bde@FreeBSD.org> | 1995-01-31 17:54:39 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-01-31 17:54:39 +0000 |
commit | 410788f9213854da5a31cda7df74e9d18de8ab1a (patch) | |
tree | 93ccdf4f5870418071d54cd5c08a34d6ce12b039 /usr.bin/at | |
parent | 0c3392596f2e85f4b7130390da58f116109f4056 (diff) | |
download | FreeBSD-src-410788f9213854da5a31cda7df74e9d18de8ab1a.zip FreeBSD-src-410788f9213854da5a31cda7df74e9d18de8ab1a.tar.gz |
Fix off by one error in calculation of `mday' (months start at 1).
Jan 31 gave Jan 30, often for next year.
Diffstat (limited to 'usr.bin/at')
-rw-r--r-- | usr.bin/at/parsetime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/at/parsetime.c b/usr.bin/at/parsetime.c index 64c4eea..30e9043 100644 --- a/usr.bin/at/parsetime.c +++ b/usr.bin/at/parsetime.c @@ -116,7 +116,7 @@ static char *sc_token; /* scanner - token buffer */ static size_t sc_len; /* scanner - lenght of token buffer */ static int sc_tokid; /* scanner - token id */ -static char rcsid[] = "$Id: parsetime.c,v 1.1 1993/12/05 11:37:05 cgd Exp $"; +static char rcsid[] = "$Id: parsetime.c,v 1.1 1994/01/05 01:09:08 nate Exp $"; /* Local functions */ @@ -447,7 +447,7 @@ month(tm) */ mon = (sc_tokid-JAN); expect(NUMBER); - mday = atol(sc_token)-1; + mday = atol(sc_token); if (token() == NUMBER) { year = atol(sc_token); token(); |