Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2005 09:28:04 -0700
From:      Danny MacMillan <flowers@users.sourceforge.net>
To:        Kevin Smith <smithcam@adelphia.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: system time mysteriously changes
Message-ID:  <20050117162804.GA756@procyon.nekulturny.org>
In-Reply-To: <41D23B31.2030907@adelphia.net>
References:  <41D23B31.2030907@adelphia.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 28, 2004 at 09:05:53PM -0800, Kevin Smith wrote:
> I'm having a problem with my system clock.  The time will be fine for
> a few days, then all of a sudden, I will notice that it has jumped
> ahead by a number of hours (usually enough to change the day to the
> next day). I can confirm that the time has changed on the system
> cloth in the BIOs setup as well.  This has happened once every few
> days.
> 
> I thought it may be a clock battery problem on the the motherboard, but 
> I am thinking that this is not the case as the minutes are usually OK - 
> it is just the hours/day that changes.
> 
> Another idea that I had was that because I am dual booting windows (on 
> occasion) and freeBSD, windows may be the culprit, but  I verified that 
> by rebooting windows, it is not resetting the system clock.

If you told FreeBSD when installing that your system clock was set to
UTC that is likely the problem.  Windows assumes the system clock is
set to local time.  It's moving exactly 8 hours, which appears to be
your time zone offset from UTC.  Go into /stand/sysinstall and tell it
your system clock is set to local time.  I'm not sure where that is;
there might even be command line utilities that will do it more easily
but it should be easy to find.  You'll probably have to reset the clock
afterwards but I suspect that will be the end of your problems.

> Any ideas on what could be wrong ?  I also have ntpd running, which I 
> used as an attempt to keep the clock set correctly (in effort to find a 
> solution to the problem), but it does not appear to be able to handle 
> correcting the time.

If the offset is too large ntpd won't by default be able to correct it.
A good idea is to enable ntpdate at boot as well.  ntpdate will sync
the clock at boot, and ntpd will keep it synced thereafter.  I have
this in my rc.conf, in addition to my ntpd setup:

ntpdate_enable="YES"
ntpdate_flags="-b -v"

You shouldn't have to specify a server in your case; ntpdate will read
your existing ntp.conf for that.

> How can I debug who/when is changing the time on the clock ?
> 
> thanks,
> -Kevin

-- 
Danny



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050117162804.GA756>