public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwclock: sometimes one day lasts 23 hours.
@ 2014-06-22 12:23 Andreas Henriksson
  2014-06-23 10:44 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Henriksson @ 2014-06-22 12:23 UTC (permalink / raw)
  To: util-linux; +Cc: peppe, Andreas Henriksson

From: peppe <g1pi@libero.it>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 0abf01f..bdac003 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 "
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwclock: sometimes one day lasts 23 hours.
  2014-06-22 12:23 [PATCH] hwclock: sometimes one day lasts 23 hours Andreas Henriksson
@ 2014-06-23 10:44 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-06-23 10:44 UTC (permalink / raw)
  To: Andreas Henriksson; +Cc: util-linux, peppe

On Sun, Jun 22, 2014 at 02:23:25PM +0200, Andreas Henriksson wrote:
>  sys-utils/hwclock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-23 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-22 12:23 [PATCH] hwclock: sometimes one day lasts 23 hours Andreas Henriksson
2014-06-23 10:44 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox