104

I have dual booted Windows 10 and Ubuntu 16.04 in UEFI mode (secure boot off). My time in BIOS is correct.

When I boot into Ubuntu and then boot into Windows 10, it shows the wrong time. I have to correct it manually or by the internet in Windows 10, and when I reboot into Windows 10 then it is not a problem. The clock will show the correct time. And then when I reboot to Linux the clock is correct, but switching back to Windows 10 the clock messes up again.

  • 4
    Ubuntu is set for UTC time and Windows is not. You need to set your Windows for UTC time as well. Check out superuser.com/questions/185773/… – Terrance Jul 20 '16 at 16:08
  • thanks Terrance. I had asked this question on windows forums and they are just making me move round and round and then they left it unanswered – Brij Raj Kishore Jul 20 '16 at 16:57
  • Take a look at this as well : askubuntu.com/q/169376/295286 Frequent issue with dual boot – Sergiy Kolodyazhnyy Jul 20 '16 at 17:37
  • Not a problem. It's best to leave Ubuntu at UTC and set Windows to UTC. I have done it and noticed no problems. =) – Terrance Jul 20 '16 at 17:57
  • my bios time is not correct what should i do? – Panagiss Oct 16 at 9:14
115

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.

Solution 1: 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

If running the above command in Powershell, you'll have to specify sc.exe:

sc.exe 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

Solution 2: Make Linux use 'Local' time

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

Pre-Ubuntu 15.04 systems (e.g. Ubuntu 14.04 LTS):

  1. edit /etc/default/rcS
  2. add or change the following section

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

Ubuntu 15.04 systems and above (e.g. Ubuntu 16.04 LTS):

  1. open a terminal and execute the following command

    timedatectl set-local-rtc 1
    

source: Ubuntu Help

| improve this answer | |
  • Hi, have you try this on Windows 10 64bit also? There should be used not "dword" but "qword". Source: ubuntuhandbook.org/index.php/2016/05/… – Matěj Kříž Apr 25 '17 at 16:14
  • I had tried it on Windows 10 a year ago.... This worked then ... Can't say about now however, it most probably will work – Ceda EI Apr 25 '17 at 17:45
  • Is it safe/ok to disable Windows Time service? What does it do? If it disables time internet sync than it would be bad to disable it – user25 May 23 '18 at 18:37
  • I have a dual boot setup with Windows 10 and Ubuntu 20.04. Before doing anything, Ubuntu would display the clock correctly and Windows would display a wrong clock. Making Windows use UTC and turning off the Windows time service didn't work, it made Windows display the right time while Ubuntu displayed a wrong one. But making Ubuntu use local time made both display the same correct time. – Ameer Taweel Jul 28 at 9:42
  • i have the same problem but i noticed that Bios has the wrong time that the windows10 displays (only after i had previously booted in Linux). I tried changing the Bios time but when i go back it's the false one every time.... – Panagiss Oct 16 at 8:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.