Understanding the Problem
When dual-booting Windows and Linux on the same machine, you may notice that the system time changes when switching between operating systems. This occurs due to fundamental differences in how Windows and Linux handle the hardware clock (RTC - Real-Time Clock).
Technical Background
Hardware Clock vs System Clock:
- RTC (Real-Time Clock): A battery-powered clock on the motherboard that keeps time even when the computer is off. Also known as the BIOS clock or CMOS clock.
- System Clock: The software clock maintained by the operating system kernel while the system is running.
The Core Issue:
Windows and Linux use different time standards for the hardware clock:
-
Windows: Treats the RTC as local time by default
- The hardware clock stores the actual local time (e.g., 3:00 PM EST)
- Windows applies timezone offset to calculate UTC
- This approach dates back to MS-DOS compatibility
-
Linux/Unix: Treats the RTC as UTC (Coordinated Universal Time) by default
- The hardware clock stores UTC time
- Linux converts UTC to local time using timezone settings
- This is the POSIX standard approach
Why This Causes Problems:
When you boot into Linux, it reads the RTC as UTC and converts it to local time. If Windows previously set the RTC to local time (e.g., EST -5), Linux interprets this as UTC and displays the wrong time. Similarly, when booting back to Windows, it reads the UTC time set by Linux as local time, causing another offset.
Solution Approaches
There are two ways to resolve this conflict:
Option 1: Configure Linux to Use Local Time (Recommended for Dual-Boot)
This approach makes Linux behave like Windows, treating the RTC as local time.
On Windows set timezone to manual
On Linux:
1timedatectl set-local-rtc 1 --adjust-system-clockWhat this command does:
timedatectl: System utility to control system time and date settingsset-local-rtc 1: Configures the system to maintain RTC in local time (1=true, 0=false/UTC)--adjust-system-clock: Immediately synchronizes the system clock with the new RTC interpretation
Verify the configuration:
1timedatectl statusLook for the line RTC in local TZ: yes to confirm the change.
Advantages:
- Simple one-line fix on Linux
- No changes required to Windows
- Ideal for dual-boot desktop systems
Disadvantages:
- Deviates from Linux/Unix standard practice
- Can cause issues with daylight saving time transitions
- May affect time synchronization with NTP servers
Option 2: Configure Windows to Use UTC (Advanced Users)
This approach makes Windows behave like Linux. This requires modifying the Windows Registry.
On Windows (Run as Administrator):
Create a registry entry to enable UTC for the RTC:
1reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /fFor 64-bit Windows systems, you may also need:
1reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_QWORD /fPowerShell equivalent:
1Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Value 1 -Type DWordRevert if needed:
1reg delete "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /fAdvantages:
- Keeps Linux in its standard UTC configuration
- Better for systems that sync time frequently
- Handles daylight saving time more reliably
Disadvantages:
- Requires registry modification
- May cause issues with some Windows software
- Windows updates might reset this setting
Technical Details: timedatectl Command
The timedatectl utility is part of systemd and provides comprehensive time management:
View Current Status:
1timedatectlOutput interpretation:
Local time: Tue 2026-01-14 15:30:45 EST
Universal time: Tue 2026-01-14 20:30:45 UTC
RTC time: Tue 2026-01-14 15:30:45
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
NTP service: active
RTC in local TZ: yes
List Available Timezones:
1timedatectl list-timezonesSet Timezone:
1sudo timedatectl set-timezone America/New_YorkEnable NTP Synchronization:
1sudo timedatectl set-ntp trueTroubleshooting
Time Still Incorrect After Changes
- Manually sync the system clock:
1sudo hwclock --systohcThis writes the current system time to the hardware clock.
- Check if NTP is synchronizing:
1timedatectl timesync-status- Force NTP sync:
1sudo systemctl restart systemd-timesyncdDaylight Saving Time Issues
If you're using the local RTC approach, disable automatic DST updates in Windows:
- Open Settings → Time & Language → Date & Time
- Disable "Set time automatically"
- Disable "Set time zone automatically"
- Enable "Adjust for daylight saving time automatically"
Check Hardware Clock Directly
Read RTC:
1sudo hwclock --showCompare RTC with system time:
1sudo hwclock --show && dateBest Practices
- Choose one standard: Decide whether to use UTC or local time and configure both systems accordingly
- Use NTP: Enable Network Time Protocol on both systems to keep clocks synchronized
- Document your choice: Note which method you used in case you need to reinstall
- Test after daylight saving: Verify time is correct after DST transitions
Additional Notes
- Triple-boot systems: If you have macOS in the mix, it also uses UTC by default like Linux
- Virtual machines: VMs typically handle time differently; these issues usually don't affect VM guests
- UEFI vs BIOS: Modern UEFI systems still maintain a single RTC that both OSes share
- Windows 11: The registry method works on Windows 11, though Microsoft doesn't officially support it