Tuesday, October 6, 2015
Dual Boot: Fix Time Differences Between Ubuntu And Windows
Quick tip for users who dual boot Ubuntu and Windows: if the time is off on your computer when you reboot and switch between Ubuntu and Windows, here's how to fix it.
If you dual boot and there are time conflicts between Windows and Ubuntu, this occurs because Ubuntu store the time on the hardware clock as UTC by default while Microsoft Windows stores the time as local time, thus causing conflicting times between Ubuntu and Windows.
The fix is pretty easy and it can be applied from both Ubuntu and Windows.
Fix time differences between Ubuntu and Windows
Before proceeding, note that according to the Ubuntu wiki, "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".
A. To fix the UTC / local time difference between Ubuntu and Windows from Ubuntu by making Ubuntu use local time, you must edit the /etc/default/rcS file and replace "UTC=yes" with "UTC=no" (both without the quotes). To do this automatically, simply copy/paste the following command in a terminal:
sudo sed -i 's/UTC=yes/UTC=no/' /etc/default/rcS
And then reboot.B. To fix this from Windows (it should work with Vista SP2, Windows 7, Server 2008 R2 and Windows 8/8.1), by making it use UTC instead of local time, download THIS Windows registry file and simply double click it.
Then, to disable the Windows Time service (which still writes local time to RTC regardless of the registry setting above, on shutdown), run Command Prompt as Administrator and paste this command:
sc config w32time start= disabled
And reboot.How to revert the changes
A. From Ubuntu: reverting this change from Ubuntu is pretty easy. All you have to do is replace "UTC=no" with "UTC=yes" in the /etc/default/rcS file. To do this automatically, copy/paste the command below in a terminal:
sudo sed -i 's/UTC=no/UTC=yes/' /etc/default/rcS
And then reboot your computer.B. From Windows: reverting this change is a bit more complicated from Windows.
Firstly, open the .reg file downloaded when applying the fix for Windows (see download link above) with a text editor and change the "RealTimeIsUniversal" value from "dword:00000001" to "-" (without the quotes). Here's how the file should look like after making this change:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=-
Then save the file and double click it. Next, run the following command in Command Prompt (which you need to run as Administrator) to re-enable the Windows Time service:
sc config w32time start= demand
And finally, reboot.References / more information:
image via
Labels:
dual boot,
fix,
tips n tricks,
Ubuntu,
windows
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment