Re: [Dovecot] Time just moved backwards error even with ntpd
On some FreeBSD 6.2 systems I was solved this problem just by adding to crontab:
@hourly /sbin/sysctl /sbin/sysctl -e machdep.adjkerntz
>/dev/null 2>&1
For some explanation, see: http://lists.freebsd.org/pipermail/freebsd-hackers/2005-August/013383.html
Quote follows:
... It seems that CMOS clock is updated using resettodr(9) function. There seem to be only a few occasions when this function is called:
- clock_settime(ClOCK_REALTIME) // through kern_time.c:settime()
- settimeofday() // through kern_time.c:settime()
- machdep.adjkerntz sysctl is set
I believe that ntpd calls *settime-family* functions *only* if time offset is *larger* than *128ms* (or maybe I am thinking about ntpdate), but normally it uses ntp_adjtime() to adjust time keeping. Obviosuly, a system running ntpd with good enough hardware clock and good enough connection to good enough ntp server(s) would use the latter method all of the time after some initial stabilization period. But it seems that time changes are *never propagated to CMOS* in this case, ...
Alexander
participants (1)
-
Alexander Moisseev