If you have a computer where a Linux OS (e.g. Ubuntu) is dual-booted with Windows, you will notice that, every time you reboot from Linux to Window, clock time displaying incorrectly in Windows. Even some Linux may show incorrect time if you are returning from Windows. Here’s how to solve this.

To keep track of proper time, Operating Systems make use of BIOS time settings from your computer’s motherboard. Because BIOS has the ability to keep running the clock even if your system is turned off (using CMOS memory and battery). Different Operating Systems may use different methods to store clock/time information in BIOS. For example, Unix and Linux based systems (e.g. Debian, Ubuntu, Mac, BSD, etc.) use “UTC” time format while Windows uses “Local time” format to write to BIOS clock settings. UTC (GMT) is better as you don’t have to change hardware time when you move to another timezone.

Windows and Linux time conflict on multi-boot system

The problem happens when you install multiple Operating Systems with multi-boot procedure on same computer which shares same motherboard. As the same BIOS clock settin is used by all OS present on the computer, when you reboot from one to another, they read each other’s BIOS clock settings incorrectly. This is why your Windows or Linux is showing wrong time when switching from each other. However, Boot Camp in Mac system has fix for this.

To fix this problem, you need to change how an OS stores its clock data to BIOS. You should do it either from Windows side, or from Linux side. Not both!

Method 1: Linux Side Fix (Make Linux use “Local” Time)

We need to edit the file /etc/default/rcS and set UTC=no. You can do it normally by using any text editor or use following method if you have gedit installed.

  1. Open Terminal (press Ctrl+Alt+T for quick access) and type the following command and hit Enter.
    sudo su root
  2. Type your password when it asks and hit Enter. This will give you root access.
    Enter sudo su root in Terminal
  3. Now type the following command and hit Enter to open /etc/default/rcS file with gedit text editor.
    gedit /etc/default/rcS
  4. This will Open that rcS file in gedit. Notice “UTC” is set to “yes” there.
    Open rcS file in gedit
  5. Replace “yes” with “no” as following and click Save on toolbar.
    Set UTC=no In Linux
  6. Close both gedit and Terminal. You are done!

Above guide is applicable for most Debian based Linux OSes like Ubuntu, Linux Mint, etc. and many other non-Debian Linux. You can checkout UbuntuTime help page.

Also checkout this preference difference between Debian 6 (Squeeze) rcS and Debian 7 (Wheezy) rcS. More Debian hwclock information.

On Fedora, openSUSE, ArchLinux, Some Debian versions: Replace the word UTC with the word LOCAL in /etc/adjtime file. In case the file doesn’t exist, create the file with following contents:

0.0 0 0.0

On Red Hat: Replace “UTC=true’‘ with “UTC=false” in “UTC” line of the file /etc/sysconfig/clock.

If you can’t find related file in your version of Linux Distro, check out clock/time configuration documentation page on your Operating System’s official site or try Windows side fix. However, many other factors are also involved regarding UTC vs Local preference in Linux clock system.

If you have more than one Linux OS installed on the same machine, make this change for all Linuxes.

Method 2: Windows Side Fix (Make Windows use “UTC” Time)

This fix is tested on Windows 10, Window 8.x, Windows 7 and Vista Service Pack 2. Any lower version of Windows will be supported.

  1. Press Windows+R key and type regedit and hit OK. This will open Windows Registry Editor.
    Open Registry Editor
  2. Navigate to the location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation.
    TimeZoneInformation in Registry
  3. From left side, right-click on TimeZoneInformation folder and then select New > DWORD (32-bit) Vlaue.
    Create new DWORD value in 32 bit
  4. Rename the new entry to RealTimeIsUniversal.
    Rename registry value
  5. Now double-click on the entry RealTimeIsUniversal and set Value data 1. Hit OK then.
    Set DWORD value 1
  6. Close Registry Editor.

In case you want to revert this, simply delete the entry RealTimeIsUniversal.

Now the problem is “Windows Time service” will still write “local time” to hardware clock setting. So we need to disable it and prevent it from auto starting. To do so,

  1. Press Windows+R key and type service.msc and hit OK. This will open Windows Service manager.
    Open Windows Serivces
  2. Locate Windows Time and double-click on it.
    Navigate to Windows Time serivce
  3. Choose Disabled under Startup type and hit Apply.
    Disable Windows Time service
  4. You are done!

Note: Syncing your Windows clock with internet using buit-in “Date and Time” settings will make “Window Time service” again start.Thus it will break your preference. Try to use a third-party tool to sync it.

You can always change these setting if you decide to keep Windows clock in local time.

If you have more than one Windows (such as Windows 10 and Windows 7) installed on same system, do this change for all Windows versions.

Again, use either Windows fix, or Linux. Not both.

Tell us how you managed to keep your both Window and Linux time accurate in your multi-boot computer.

Share on Tweet about this on TwitterShare on Facebook7Share on Google+3Share on LinkedIn0Pin on Pinterest0Email this to someonePrint this page


Jaber is a tech enthusiast, geek and web worm from Dhaka, Bangladesh. He is the founder and Chief-Editor of TechGainer. While he is away from his keyboard, either he's fishing or messing with wildlife. In case, you can contact him at rijans[at]techgainer[dot]com.