summaryrefslogtreecommitdiff
path: root/confpars.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1997-05-09 08:37:30 +0000
committerTed Lemon <source@isc.org>1997-05-09 08:37:30 +0000
commite7447b52587a04e5acfa8103cd143584a59738ca (patch)
treed9116e7a40213ecf814365b72b9bfd88d0f7f0cd /confpars.c
parentdf65165b96b9892c36212baecdf22d3f5e4a6825 (diff)
downloadisc-dhcp-e7447b52587a04e5acfa8103cd143584a59738ca.tar.gz
Fix date parse off-by-one-day error
Diffstat (limited to 'confpars.c')
-rw-r--r--confpars.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/confpars.c b/confpars.c
index c7893439..da7efa47 100644
--- a/confpars.c
+++ b/confpars.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.36.2.2 1997/04/03 21:09:59 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.36.2.3 1997/05/09 08:37:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -1589,12 +1589,12 @@ TIME parse_date (cfile)
/* Guess the time value... */
guess = ((((((365 * (tm.tm_year - 70) + /* Days in years since '70 */
- (tm.tm_year - 72) / 4 + /* Leap days since '70 */
+ (tm.tm_year - 69) / 4 + /* Leap days since '70 */
(tm.tm_mon /* Days in months this year */
? months [tm.tm_mon - 1]
: 0) +
(tm.tm_mon > 1 && /* Leap day this year */
- ((tm.tm_year - 72) & 3)) +
+ !((tm.tm_year - 72) & 3)) +
tm.tm_mday - 1) * 24) + /* Day of month */
tm.tm_hour) * 60) +
tm.tm_min) * 60) + tm.tm_sec;