Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Fix Windows and Linux Show Different Time in Dual Boot

November 5, 2022
in Blog
0
ADVERTISEMENT

Table of Contents

If you dual boot Windows and Ubuntu or any other Linux distribution, you might have noticed a time difference between the two operating systems.

When you use Linux, it shows the correct time. But when you boot into Windows, it shows the wrong time. Sometimes, it is the opposite and Linux shows the wrong time and Windows has the correct time.

That’s strange specially because you are connected to the internet and your date and time is set to be used automatically.

Why Windows and Linux show different time in dual boot?

A computer has two main clocks

  • A hardware clock which is also called RTC (real time clock) or CMOS/BIOS clock. This clock is outside the operating system, on your computer’s motherboard. It keeps on running even after your computer is powered off.
  • The system clock is what you see inside your operating system. When your computer is powered on, the hardware clock is read and used to set the system clock. 

Afterwards, the system clock is used for tracking time. If your operating system makes any changes to system clock, like changing time zone etc., it tries to sync this information to the hardware clock.

By default, Linux assumes that the time stored in the hardware clock is in UTC, not the local time. On the other hand, Windows thinks that the time stored on the hardware clock is local time. That’s where the trouble starts.

Fixing Windows Showing Wrong Time in a Dual Boot

There are two ways you can go about handling this issue:

  • Make both Ubuntu and Windows check for date, time and timezone automatically via internet
  • Make Linux use local time for the hardware clock.

Make your OS set time and date automatically

To make your Ubuntu Linux system check for date and time automatically, go to System Settings | Date & Time and enable both options.

Bg2451

You should do a similar settings change for Windows as well.

Bg2452

Make Ubuntu use local time for hardware clock

It is easier to make the changes in Linux and hence I’ll recommend going with this method.

Ubuntu and most other Linux distributions use systemd these days and hence you can use timedatectl command to change the settings.

# sudo timedatectl 
               Local time: ស 2022-11-05 06:55:33 +07    
           Universal time: សុ 2022-11-04 23:55:33 UTC   
                 RTC time: សុ 2022-11-04 23:55:33       
                Time zone: Asia/Ho_Chi_Minh (+07, +0700)
System clock synchronized: no                           
              NTP service: active                       
          RTC in local TZ: no

What you are doing is to tell your Linux system to use the local time for the hardware clock (RTC). You do that with the set-local-rtc (set local time for RTC) option:

timedatectl set-local-rtc 1

As you can see, the RTC now uses the local time.

# sudo timedatectl set-local-rtc 1
# sudo timedatectl
               Local time: សុ 2022-11-04 23:58:06 +07   
           Universal time: សុ 2022-11-04 16:58:06 UTC   
                 RTC time: សុ 2022-11-04 23:58:06       
                Time zone: Asia/Ho_Chi_Minh (+07, +0700)
System clock synchronized: yes                          
              NTP service: active                       
          RTC in local TZ: yes                          

Now if you boot into Windows, it takes the hardware clock to be as local time which is actually correct this time. When you boot into Linux, your Linux system knows that the hardware clock is using local time.

5/5 - (1 vote)
Previous Post

How to Boot Windows 11 into the Recovery Mode from Windows

Next Post

How to Create a Virtual USB Drive in Windows 10

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory