Archives For November 30, 1999

For those dual boot Windows 11 with Ubuntu or other Linux, you’ll find different time display in each system. And usually Windows shows the incorrect clock time.

There are two time standards, localtime and Coordinated Universal Time (UTC, aka GMT). The local time standard is dependent on the current time zone, while UTC is the global time standard that is independent of time zone.

By default, Windows uses localtime, but Ubuntu uses UTC. So you get the different time in the dual boot. And the solution is set the same time standard in the two systems.

Method 1.) Set RTC to local time zone in Ubuntu:

Though it’s not recommended, set the Real Time Clock (RTC) to use local time zone just works.

Firstly, open terminal either from system app launcher or by pressing Ctrl+Alt+T on keyboard. When it opens, run command:

timedatectl set-local-rtc 1 --adjust-system-clock

Then you can check system clock status via command:

timedatectl

And “RTC in local TZ: yes”, where TZ means time zone, tells localtime standard is in use.

As I said “it’s not recommended“, it warns that localtime standard may cause various problems with time zone changes and daylight saving time adjustments.

You can restore UTC time standard and do method 2 instead by running command:

timedatectl set-local-rtc 0

Method 2.) Enable UTC time in Windows 11:

If you’re now running Windows 11, you can easily enable the UTC / GMT time standard via following steps.

1. Firstly, click on ‘Search’ icon on task bar. Then search for and right-click on ‘Command Prompt’ and select ‘Run as administrator’.

2. When command prompt opens, copy and paste the command below and hit run:

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

The command creates a registry key to tell Windows to use universal time standard.

Refresh the display time to apply change:

If Windows 11 shows the incorrect date and time, search for and open “Settings” from start menu. Then go to “Time & Language” from left pane, click “Date & time” and finally disable and re-enable ‘Set time automatically’ option will correct your system time.

For Ubuntu users, it may also display incorrect time when “Automatic Date & Time” not enabled. Simply enable or refresh the option in System “Settings -> Date & Time” will do the trick.

Ubuntu and Windows dual boot

For users who dual boot Ubuntu 16.04 and Windows, you may find the clock time is off that causes time differences after you reboot and switch between the two systems. Here’s how to fix it.

Ubuntu maintains the hardware clock (RTC, real time clock) in universal time (UTC) by default while Windows maintains the clock in local time, thus causing time conflicts between Ubuntu and Windows.

To fix it, either set Ubuntu to maintain RTC in local time or make Windows uses UTC.

1. Disable UTC and use Local Time in Ubuntu:

In previous Ubuntu editions, you can edit the config file /etc/default/rcS to disable UTC.

In Ubuntu 16.04, open terminal (Ctrl+Alt+T) and run the command below instead:

timedatectl set-local-rtc 1 --adjust-system-clock

To check out if your system uses Local time, just run:

timedatectl

you’ll the local time zone is in use in the Warning section.

RTC Local Time

Finally restart and switch to Windows, adjust system clock time if need and done.

2. Make MicroSoft Windows uses UTC:

Another way to fix this issue is doing the following changes in Windows, Windows 10, in the case below:

1.) First if you’ve switched to local time in Ubuntu, run command in Ubuntu terminal to use back UTC:

timedatectl set-local-rtc 0

2.) Restart and select boot into Windows 10, when you’re in, do:

  • go to Start Menu, search for and launch cmd as Administrator.
  • When the command console opens, paste below command to create a DWORD value to the registry:
    Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1

    For 64-bit Windows, use a QWORD value instead:

    Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_QWORD /d 1

    enable UTC in Windows 10

  • Disable the “internet update” for the time and reboot.