summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/parse/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/xntpd/parse/parse.c')
-rw-r--r--usr.sbin/xntpd/parse/parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/xntpd/parse/parse.c b/usr.sbin/xntpd/parse/parse.c
index a5fd9f1..11dacd9 100644
--- a/usr.sbin/xntpd/parse/parse.c
+++ b/usr.sbin/xntpd/parse/parse.c
@@ -642,7 +642,8 @@ parse_to_unixtime(clock, cvtrtc)
*/
t = (clock->year - 1970) * 365;
t += (clock->year >> 2) - (1970 >> 2);
- t -= clock->year / 400 - 1970 / 400;
+ t -= clock->year / 100 - 1970 / 100;
+ t += clock->year / 400 - 1970 / 400;
/* month */
if (clock->month <= 0 || clock->month > 12)
OpenPOWER on IntegriCloud