<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged dualboot</title>
<link>https://coderlegion.com/tag/dualboot</link>
<description>Powered by Question2Answer</description>
<item>
<title>Why Does the System Clock Break on Windows + Linux Dual Boot?</title>
<link>https://coderlegion.com/9059/why-does-the-system-clock-break-on-windows-linux-dual-boot</link>
<description>&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Anyone running &lt;strong&gt;dual boot with Windows and Linux&lt;/strong&gt; has likely encountered this behavior:&lt;br&gt;
Linux shows the correct time. You reboot into Windows… and the system clock is suddenly &lt;strong&gt;several hours ahead&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This happens across many distributions — &lt;strong&gt;Ubuntu, Fedora, Linux Mint, Big Linux&lt;/strong&gt;, and others — and it is &lt;strong&gt;not a bug&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It is the result of &lt;strong&gt;fundamentally different architectural decisions&lt;/strong&gt; about how operating systems interpret time.&lt;/p&gt;
&lt;p&gt;In this article, you’ll learn:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the &lt;strong&gt;RTC (Real-Time Clock)&lt;/strong&gt; is&lt;/li&gt;
&lt;li&gt;How Linux and Windows interpret system time differently&lt;/li&gt;
&lt;li&gt;Why the issue happens&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;technically correct solution&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kggmu7oo6g7zgkvjf077.webp&quot; alt=&quot;CPU Battery&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-is-the-rtc-real-time-clock-&quot;&gt;What Is the RTC (Real-Time Clock)?&lt;/h3&gt;
&lt;p&gt;Every computer has a &lt;strong&gt;Real-Time Clock&lt;/strong&gt;, also known as the &lt;em&gt;hardware clock&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is powered by the motherboard battery&lt;/li&gt;
&lt;li&gt;Keeps time while the system is turned off&lt;/li&gt;
&lt;li&gt;Lives in the firmware (&lt;strong&gt;BIOS/UEFI&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Provides the initial system time during boot&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;the-key-detail&quot;&gt;The key detail&lt;/h4&gt;
&lt;p&gt;The RTC &lt;strong&gt;does not store timezone information&lt;/strong&gt;.&lt;br&gt;
It only stores a raw date and time value.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;The operating system decides how that value is interpreted.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is where the conflict begins.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-linux-handles-time-and-timezones&quot;&gt;How Linux Handles Time and Timezones&lt;/h3&gt;
&lt;p&gt;Linux and other Unix-like systems follow a long-established convention:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The RTC is treated as &lt;strong&gt;UTC&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Timezone conversion happens in software&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At boot time:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Linux reads the RTC as UTC  &lt;/li&gt;
&lt;li&gt;Applies the configured timezone offset  &lt;/li&gt;
&lt;li&gt;Displays the correct local time  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When writing time back to the hardware clock, Linux keeps it in &lt;strong&gt;UTC&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This approach is technically robust and ideal for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi-boot systems&lt;/li&gt;
&lt;li&gt;NTP synchronization&lt;/li&gt;
&lt;li&gt;Timezone changes&lt;/li&gt;
&lt;li&gt;Predictable behavior&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2tfxc9iy8ar55di6toz.png&quot; alt=&quot;linux terminal with timezone&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-windows-handles-system-time&quot;&gt;How Windows Handles System Time&lt;/h3&gt;
&lt;p&gt;Windows follows a different model.&lt;/p&gt;
&lt;p&gt;By default, Windows assumes the RTC is set to &lt;strong&gt;local time&lt;/strong&gt;.&lt;br&gt;
The value read from the hardware clock is displayed directly, without applying a timezone conversion.&lt;/p&gt;
&lt;p&gt;This design decision is historical and works well for single-OS systems, but it conflicts with Unix-like conventions.&lt;/p&gt;
&lt;h3 id=&quot;section&quot;&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdzuywm57trjaqv3ose5.png&quot; alt=&quot;Windows gui with Canada/US timezone&quot;&gt;&lt;/h3&gt;
&lt;h3 id=&quot;why-the-clock-is-wrong-in-dual-boot&quot;&gt;Why the Clock Is Wrong in Dual Boot&lt;/h3&gt;
&lt;p&gt;Example for a system configured to &lt;strong&gt;UTC−3&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Local time: &lt;strong&gt;15:00&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;UTC time: &lt;strong&gt;18:00&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Linux writes &lt;strong&gt;18:00 (UTC)&lt;/strong&gt; to the RTC&lt;/li&gt;
&lt;li&gt;Windows reads &lt;strong&gt;18:00 as local time&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;The system clock appears 3 hours ahead in Windows.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is not a synchronization issue — it is a clash between two different time models.&lt;/p&gt;
&lt;h3 id=&quot;section-1&quot;&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdxwyfcqo4odydoystch.png&quot; alt=&quot;visual info about problem&quot;&gt;&lt;/h3&gt;
&lt;h3 id=&quot;recommended-fix-configure-windows-to-use-utc&quot;&gt;Recommended Fix: Configure Windows to Use UTC&lt;/h3&gt;
&lt;p&gt;From a technical perspective, the cleanest solution is to align Windows with the Linux model by making it interpret the RTC as &lt;strong&gt;UTC&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;steps&quot;&gt;Steps&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Registry Editor&lt;/strong&gt; (&lt;code&gt;regedit&lt;/code&gt;) as administrator  &lt;/li&gt;
&lt;li&gt;Navigate to:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Create a &lt;strong&gt;DWORD (32-bit)&lt;/strong&gt; value named:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;RealTimeIsUniversal
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Set its value to:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Reboot the system&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After this change, Windows will correctly apply the timezone offset and the issue will be resolved permanently.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2v5wi7masi2f2ha04vds.webp&quot; alt=&quot;regedit&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;alternative-fix-force-linux-to-use-local-time-not-recommended-&quot;&gt;Alternative Fix: Force Linux to Use Local Time (Not Recommended)&lt;/h3&gt;
&lt;p&gt;It is also possible to force Linux to treat the RTC as local time:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;timedatectl set-local-rtc 1 --adjust-system-clock
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;⚠️ &lt;strong&gt;This approach is not recommended.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Breaks Unix-like conventions&lt;/li&gt;
&lt;li&gt;Can cause NTP synchronization issues&lt;/li&gt;
&lt;li&gt;Creates problems when changing timezones&lt;/li&gt;
&lt;li&gt;Is explicitly discouraged by &lt;code&gt;systemd&lt;/code&gt; documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This should only be used as a last-resort workaround.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The dual boot clock issue is not a bug — it’s the result of &lt;strong&gt;two different architectural approaches&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linux treats the RTC as &lt;strong&gt;UTC&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Windows assumes the RTC is &lt;strong&gt;local time&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Understanding this distinction allows you to fix the problem &lt;strong&gt;once and for all&lt;/strong&gt;.&lt;br&gt;
Configuring Windows to use UTC is the most predictable and technically sound solution.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;references&quot;&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Microsoft — Windows Time Service&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-top&quot;&gt;https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-top&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;systemd — timedatectl&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.freedesktop.org/software/systemd/man/latest/timedatectl.html&quot;&gt;https://www.freedesktop.org/software/systemd/man/latest/timedatectl.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Arch Linux Wiki — System Time&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://wiki.archlinux.org/title/System_time&quot;&gt;https://wiki.archlinux.org/title/System_time&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ubuntu Documentation — Time and Date&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://help.ubuntu.com/stable/ubuntu-help/clock-set.html.en&quot;&gt;https://help.ubuntu.com/stable/ubuntu-help/clock-set.html.en&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stack Overflow discussions on RTC and dual boot&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/73778596/windows-shows-wrong-time-after-dualboot&quot;&gt;https://stackoverflow.com/questions/73778596/windows-shows-wrong-time-after-dualboot&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Process Mgmt</category>
<guid isPermaLink="true">https://coderlegion.com/9059/why-does-the-system-clock-break-on-windows-linux-dual-boot</guid>
<pubDate>Mon, 29 Dec 2025 14:19:20 +0000</pubDate>
</item>
</channel>
</rss>