Ubuntu: Dual boot system Windows 10 and Ubuntu 12.04 [duplicate]


This question already has an answer here:

How to get the both of the systems to show correct time? As of now what I get is every time after using Ubuntu, Windows' time gets changed by +4 hrs. None of the solutions posted here are working.


Your computer contains a small clock, that has an own small battery, so it won't lose track of time, even when your pc is shutdown. Linux/Ubuntu expects this clock to give the time in the UTC timezone, which, depending on where you live, differs from your local time (also, UTC does not have daylight saving time). Windows on the other hand, expects this clock to give the local time. The solution would be to either set Windows to expect utc, or set linux so it expects localtime. Since the Windows solution involves messing with the registry, lets look at how to do it in Ubuntu: Open the file /etc/default/rcS with root privileges and an editor of your choice, e.g.:

sudo nano /etc/default/rcS  

Change the following line to look like this:

# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.  UTC=no  

Now you may have to set the clock to the correct time again.

NOTE: This method should only be used with Versions up to 15.04, since the introduction of systemd changed ways.


Multiple Boot Systems Time Conflicts

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 Intrepid (8.10), UTC=yes is 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, Server 2008 R2 and Windows 8/8.1.

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

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  

Note: Windows Time service will still write local time to the RTC regardless of the registry setting above on shutdown, so it is handy to disable Windows Time service with this command (if time sync is still required while in Windows use any third-party time sync solution):

sc config w32time start= disabled  

Reversing the change You can create a file with the following contents and then double-click it to merge in the original changes, as above:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]       "RealTimeIsUniversal"=-  

If Windows Time service was disabled, enable it again with the command:

sc config w32time start= demand  

Make Linux use 'Local' time

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

edit /etc/default/rcS  

add or change the following section

# Set UTC=yes if your hardware clock is set to UTC (GMT)  UTC=no  

For more details you can check the following link:

Multiple Boot Systems Time Conflicts

Hope, It will be work :)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »