[Techtalk] NTP and Windows

John Clarke johnc+linuxchix at kirriwa.net
Wed Nov 3 13:56:38 EST 2004


On Tue, Nov 02, 2004 at 10:21:36 -0600, Meredith L. Patterson wrote:

> My laptop is dual boot Gentoo/Windows 2000, and on the Linux side I use
> NTP to set the clock. It works great, but when I reboot into Windows, I
> always have to manually reset the time (five hours backward). Does

The most likely reason is that your hardware clock is set to UTC and
your timezone is UTC-5.  Windows always uses local time, so when it
reads the h/w clock on startup, it gets UTC and that's five hours later
than local.

Linux can be told to set the h/w clock to local time so that when you
boot Windows you get the right time.  The command to do that is
hwclock, and you'll find that it's called from the startup and shutdown
scripts to read the h/w clock on startup and write it on shutdown.  On
Redhat systems, the options to control it are in /etc/sysconfig/clock. 
I don't know where other distros put it, but it shouldn't be too hard
to find (it'll be somewhere under /etc).

You can also run ntp on Windows to keep your clock in sync.  There
should be a Windows ntp client somewhere on http://ntp.org/.

Hope this helps.


Cheers,

John
-- 
I've always wondered ... If a C function invokes undefined behaviour,
but no code is there to call the C function, what colour are the
demons?
            -- Willem


More information about the Techtalk mailing list