]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: sometimes one day lasts 23 hours.
authorpeppe <g1pi@libero.it>
Sun, 22 Jun 2014 12:23:25 +0000 (14:23 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Jun 2014 09:48:14 +0000 (11:48 +0200)
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 <andreas@fatal.se>
sys-utils/hwclock.c

index 0abf01fa15336ee8142d194ea6ac08d47e1977e9..bdac003e005e4195232ef95a2083f5fc70308bc1 100644 (file)
@@ -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 "