From: peppe Date: Sun, 22 Jun 2014 12:23:25 +0000 (+0200) Subject: hwclock: sometimes one day lasts 23 hours. X-Git-Tag: v2.25-rc2~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=033effcacd546952698e18a7eb56c1ce8b167cbe;p=thirdparty%2Futil-linux.git hwclock: sometimes one day lasts 23 hours. If less than 23 hours have passed since the last calibration, hwclock says "Not adjusting drift factor because it has been less than a day since the last calibration.", but in fact compares to 23 hours, not 24. This was originally reported at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689534 Signed-off-by: Andreas Henriksson --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 0abf01fa15..bdac003e00 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -989,7 +989,7 @@ adjust_drift_factor(struct adjtime *adjtime_p, "calibration time is zero,\n" "so history is bad and calibration startover " "is necessary.\n")); - } else if ((hclocktime - adjtime_p->last_calib_time) < 23 * 60 * 60) { + } else if ((hclocktime - adjtime_p->last_calib_time) < 24 * 60 * 60) { if (debug) printf(_("Not adjusting drift factor because it has " "been less than a day since the last "