View previous topic :: View next topic |
Author |
Message |
unixj Tux's lil' helper
Joined: 18 Jul 2003 Posts: 147
|
Posted: Sun Nov 04, 2007 9:06 pm Post subject: ntpd killed by Daylight Saving Time [SOLVED] |
|
|
When I turned on my computer this morning I was disappointed to see that it wasn't displaying the correct time (Daylight Saving Time took effect at 2am). I noticed that ntpd wasn't running and from /var/log/ntpd.log:
Code: | 4 Nov 10:12:12 ntpd[5654]: time correction of -3601 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time. |
I don't understand what's wrong with my configuration? In /etc/conf.d/clock I have CLOCK="local" (as recommended by the file, since I'm dual-booting with Windows):
Code: | CLOCK="local"
TIMEZONE="America/Los_Angeles"
CLOCK_SYSTOHC="yes" |
It seems the problem is that ntpd doesn't realize my system is using local time and will shift suddenly twice/year? That seems pretty basic- isn't this a bug? Or should I be using something other than ntpd??
Last edited by unixj on Mon Nov 05, 2007 1:52 am; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54782 Location: 56N 3W
|
Posted: Sun Nov 04, 2007 10:50 pm Post subject: |
|
|
unixj,
Its the price you pay for dual booting.
Had you booted Windows first after the time change, it would have changed your hardware clock and all would be well.
Because you booted Gentoo first, it found an hour error between the BIOS and ntpd time after appling your time zone.
That was right as your BIOS clock was in error by 1 hour.
On a Linux only box, BIOS time is UTC, all year round _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Nov 04, 2007 11:12 pm Post subject: Re: ntpd killed by Daylight Saving Time |
|
|
Use /etc/init.d/ntp-client - see wiki. |
|
Back to top |
|
|
unixj Tux's lil' helper
Joined: 18 Jul 2003 Posts: 147
|
Posted: Mon Nov 05, 2007 1:28 am Post subject: |
|
|
Thanks! Was missing ntp-client. I should be good to go on 9 March 2008. |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Mon Nov 05, 2007 2:12 am Post subject: |
|
|
i had time not synced for two days during boot up.{last 2 dys}
manual ntpdate could not find any suitable servers.
but after about 2 hrs i tried manual and auto sync both worked.
it is not net connection problem, because the browser works for all urls.
i adjusted with current time got with google.
i dont think all ntp servers were down
there is something funny going on after the update of previous portage and sync. _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54782 Location: 56N 3W
|
Posted: Mon Nov 05, 2007 6:44 pm Post subject: |
|
|
padoor,
If your time error is more than 1000 seconds, ntpd gives up.
ntp-client does one sync with a time server then exits. It will update your time no matter what the error. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
|
Back to top |
|
|
unixj Tux's lil' helper
Joined: 18 Jul 2003 Posts: 147
|
Posted: Sat Mar 15, 2008 6:18 pm Post subject: |
|
|
unixj wrote: | Thanks! Was missing ntp-client. I should be good to go on 9 March 2008. |
Reporting back... My time was correct when I booted on 9 March 2008. Thanks to ntp-client. But this didn't adjust the hardware clock. When I shutdown that day and hwclock tried to use the system time to set the hardware clock, it saw the hardware clock was off by 3600 and set a drift of 3600 in /etc/adjtime.
I'm abandoning this approach and leaving it for the future to solve. It turns out you can make XP use UTC by setting the registry key RealTimeIsUniversal (even though it's not officially supported). |
|
Back to top |
|
|
|