Fix off by one error in calculation of `mday' (months start at 1).

Jan 31 gave Jan 30, often for next year.
This commit is contained in:
Bruce Evans 1995-01-31 17:54:39 +00:00
parent ce0d1cd5db
commit 68abb9f9db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6079

View File

@ -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();