Time Wrong When Dual-Booting Windows and Linux – Fix

linuxntptime zonewindows

Ever since I started using Linux in dualboot with Windows I noticed that when I rebooted the machine, the time on the other OS was wrong, e.g. it was 12:00 on Linux, then I rebooted and on Windows it was 18:00, and when I checked the BIOS, the RTC was set to 18:00. Since my timezone is -06:00 CST I assume Linux just sets the RTC’s time to UTC and re-calculates the time based on the timezone, whereas Windows just sets the RTC to the local time. Both use the same NTP server to sync the time.

The question is, which one is doing the right thing? On which one should I set the timezone setting to UTC in order to have the right time on both?

Best Answer

Neither is wrong, but using UTC is more right. The RTC doesn't have a time zone; it's just a dumb wall clock. If your local time zone honors DST (of which there are many flavors, and rules change arbitrarily), then twice a year, you have to go and change it. The OS will do it for you, but if the RTC is UTC, the OS does the UTC->local translation anyway -- why fiddle with the clock? Furthermore, during the DST "fall back" transition, the RTC can't tell you what time it is! Is it 1:30am CDT or CST?

Apparently, Windows 8 supports UTC for the RTC. Windows 7 also did, but there were issues.

There was a better argument against this back when people set their BIOS clocks manually, but server-based time is much more prevalent now.