Skip to contentSkip to conversation

hwclock: sometimes one day lasts 23 hours.

PATCH Applied Andreas Henriksson 2 participants 2 messages Jun 22, 2014 – Jun 23, 2014 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwclock: sometimes one day lasts 23 hours.

From: peppe <[email protected]>

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

---
 sys-utils/hwclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sys-utils/hwclock.c +1 -1
index 0abf01f..bdac003 100644
@@ -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 "
Signature · 1 line
2.0.0
maintainer Applied
#1 lore raw
Quoted 2 lines · Andreas Henriksson
 sys-utils/hwclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com