summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.c
diff options
context:
space:
mode:
authorpeppe2014-06-22 14:23:25 +0200
committerKarel Zak2014-06-23 11:48:14 +0200
commit033effcacd546952698e18a7eb56c1ce8b167cbe (patch)
tree4bd40fd27bf4d753cdab934e7c88227bec6ebd05 /sys-utils/hwclock.c
parentscript: clean up code to genenrate Star/Done messages (diff)
downloadkernel-qcow2-util-linux-033effcacd546952698e18a7eb56c1ce8b167cbe.tar.gz
kernel-qcow2-util-linux-033effcacd546952698e18a7eb56c1ce8b167cbe.tar.xz
kernel-qcow2-util-linux-033effcacd546952698e18a7eb56c1ce8b167cbe.zip
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 <andreas@fatal.se>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r--sys-utils/hwclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 0abf01fa1..bdac003e0 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 "