Advertisements

Windows, Linux dual-boot system time issues

Multiple Boot Systems Time Conflicts

From The Ubuntu Community:

Operating systems store and retrieve the time in the hardware clock located on your motherboard so that it can keep track of the time even when the system does not have power. Most operating systems (Linux/Unix/Mac) store the time on the hardware clock as UTC by default, though some systems (notably Microsoft Windows) store the time on the hardware clock as the ‘local’ time. This causes problems in a dual boot system if both systems view the hardware clock differently.

The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets.

Changing Linux to use local time is easier and more reliable than changing Windows to use UTC, so dual-boot Linux/Windows systems tend to use local time.

Since Ubuntu Intrepid (8.10), the hardware clock is set to UTC by default.

Make Windows use UTC

Note: This method was not initially supported on Windows Vista and Server 2008, but came back with Vista SP2, Windows 7 and Server 2008 R2.

To make MS Windows calculate the time from the hardware clock as UTC.

Via regedit:

Run regedit and navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

Right-click in the right-side panel and select New > DWORD Value. Create the key named RealTimeIsUniversal and give it a value of 1.

Using a registry file

Create a file named WindowsTimeFixUTC.reg with the following contents and then double click on it to merge the contents with the registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

Make Linux use ‘Local’ time

To tell your Ubuntu system that the hardware clock is set to ‘local’ time:

1. edit /etc/default/rcS

2. Set UTC=yes if your hardware clock is set to UTC (GMT), or UTC=no to have the hardware clock set to local time.

It’s come to my attention that this issue also affects Macs which dual boot via bootcamp or other methods. 

Questions, comments, and feedback is welcome and appreciated.

Advertisements

, , , , , , ,