[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Same dates between Debian and Windows



Bart Szyszka wrote:
> 
> Hello,
> 
> I have Debian and Windows installed on the system and for the
> life of me I can't seem to be able to get their dates to match up.
> I've tried various programs that do things with NTP servers and
> have tried to configure them with/without GMT offsets and I've
> also played around with linuxconf (with linuxconf-x package installed
> too), but no matter what I do, the Debian and Windows dates don't
> match up. They're 5 hours apart from each other. If I change one
> of them to the correct date, the other one will be off by five hours.
> Any ideas? This problem is especially annoying because of the
> time it consumes just with me rebooting between the two OSes
> to see if their dates are finally in sync.
> 
> --
> Bart Szyszka bart@gigabee.com ICQ:4982727
> B Grafyx http://www.bgrafyx.com
> Join AllAdvantage.com and get paid to surf the Web!
> http://www.alladvantage.com/go.asp?refid=ARD582

You've got three separate clocks to be concerned with:
 1) the hardware (CMOS) clock
 2) the Windows software clock (read during boot from the hardware
clock, or set via some sort of ntp application)
 3) the Linux software clock (read during boot from the hardware clock
or set via some sort of ntp application)

First thing is to decide if you want the hardware clock set to local
time or GMT time. Most DOS/Windows computers have their hardware clocks
set to local time, whereas most UNIX computers have their hardware
clocks set to GMT time.

I'm not sure if Windows can deal with the hardware clock being set to
GMT time, so you might want to set the hardware clock to local time.

Then the Windows software clock and the hardware clock should agree.

Now, in Linux, you can use the "tzconfig" program to set the local time
zone. In addition, you need to let the system know if the hardware clock
is set to GMT or local time. According to "man tzconfig", this setting
is specified in "/etc/default/rcS". So edit this file, and there's a
"GMT=" line and a comment above that line that explains how the "GMT="
line should be set. Assuming you've set the hardware clock to local
time, just leave the line as GMT=""; if you've set the hardware clock to
GMT time, set it to GMT="-u".

Now all three clocks should agree.


Reply to: