For awhile I have been seeing problems that occasionally my Windows computers are ahead by about 6 hours (Central Time). I first noticed the problem on a machine with a 2004-era motherboard running XP and it persisted even when changing the CMOS battery. I recently replaced the motherboard in my main computer and noticed the same thing. That now mainly runs Win 7 but is also set up for XP. (Home edition in all cases.) I was checking various tech postings assuming this was a Window flaw. As described below, it turns out the problem has to do with dual-booting Linux. As with that user, for each of my machines they are not set up with a bootloader--Linux was installed with no Windows drives present so it wouldn't make any changes to the Windows install. This is from http://forums.techguy.org/windows-7/927637-win7-clock-keeps-changing.html. If you boot more than one OS on a PC, it is a dual boot, at least as far as this issue is concerned, even if one of them resides on an external drive.
Both Linux and Windows read the RealTimeClock (RTC) when they are booted.
Pacific Time is GMT-7 at this time of year, so at 1 PM Pacific Daylight Time, it is 8 PM GMT.
Windows assumes the RTC is set to the local time. It does not make any adjustments for the Time Zone you've entered, it simply displays the RTC time and the Time Zone.
Linux assumes the RTC is set to Coordinated Universal Time (UTC) (Equivalent to GMT for this discussion). It reads the clock, then applies the Time Zone offset, and displays this adjusted time.
So, if the RTC is set to 1300 (1 PM), Windows reads it, converts to 12 hour format if needed, and displays 1 PM, and the Time Zone. Linux reads the RTC, checks what Time Zone you've entered, adds the offset (-7 in this case), converts to 12 hour format if needed, and will display 6AM and the Time Zone.
The problem arises if Linux is set to check the time online and update the RTC. Online time sources provide the GMT time. If Linux thinks the RTC is set to UTC, it does a direct compare, sees the RTC is off by 7 hours and corrects it, changing it to 2000 (8 PM). Windows on the other hand, converts the Internet time to local before comparing.
Windows, when not connected to a Domain, checks the time online once a week.
Linux may be set to check the time much more frequently, and may check as soon as an internet connection is detected after boot, so may adjust the clock before the display is even initialized, so you may never see that the time is off when you boot into Linux, it's being synced online too fast.
It could also be that Linux is seeing the RTC as local time, but whatever service is checking the time online is not, so once an online check is done, the RTC is set wrong. Linux never looks at the RTC except at boot, so won't show that it has been changed.
So you have to tell Linux that the RTC is set to Local time, not UTC, so it will behave like Windows does. I have been looking for a Windows utility that will automatically update the RTC every time I boot but so far I haven't found one. There is a program w32tm.exe included in Windows but it only looks to a local time server on the LAN--you can't tell it to check any on-line time server.
|