Welcome to the CSlant Blog. Here you will find interesting articles, news, and tutorials on various topics. Stay tuned for more updates.
December 07, 2024
When you install and run two operating systems, such as Windows and Linux (e.g., Ubuntu), in parallel on the same computer, you may encounter a problem where the system time between the two operating systems doesn't match. This issue occurs due to differences in how each operating system handles the hardware clock (RTC - Real-Time Clock).
This discrepancy results in the time being incorrect on one of the operating systems when you switch between them.
This is the easiest solution and doesn't affect Windows.
Execute the following command to set Linux to use local time instead of UTC:
timedatectl set-local-rtc 1 --adjust-system-clock
Confirm the change with:
timedatectl
You should see a message like RTC in local TZ: yes
.
Note: Using this method may cause issues with scheduled tasks in Linux, as most Linux systems are optimized for UTC.
This option adjusts Windows to use UTC instead of local time.
Win + R
, type regedit
, and press Enter.Navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
RealTimeIsUniversal
.RealTimeIsUniversal
to 1
.Both methods ensure that the system time remains consistent across operating systems when running Windows and Linux in parallel.
Related: