Fixing incorrect clock / time settings while dual-booting Windows/Linux

So, I recently got my father to start to switch from Windows to GNU/Linux. The man is a serious privacy freak who knows Windows systems better than almost anyone who hasn’t been formally trained.

Envision a hermit with long hair and a bushy beard who has spent years complaining about the state of privacy, governments and the like; you aren’t far from the truth with that image.

In the light of Windows 10 becoming the main OS for Windows users, and Windows 7 users being pushed harder and harder to switch, he has been growing more and more curious about making the switch. He’s currently dual-booting and isn’t quite ready to make a total conversion yet, but he’s getting there!

With that being said, an issue that he is facing, and that I know many others have faced when running a dual-boot system, is when they swap over to GNU/Linux for a while, and then boot back into Windows only to find that their clock is set at the wrong time!

The reason for this is because GNU/Linux (as well as other OS’s like Mac OS X) use UTC (Coordinated Universal Time) and Windows does not. Because the two operating systems communicate with your hardware and system a little differently on this topic, there is always going to be that little bit of an issue….or is there?

The GNU/Linux Solution

Linux Time

The solution, or rather, multiple possible solutions, are all quite easily solved. My preferred method for this issue, is simply to make the GNU/Linux system use ‘localtime’ instead of UTC. To do this on any modern system using SystemD, use the following command:

sudo timedatectl set-local-rtc 1

And done. That was easy!

The Windows Solution

However, for those of you who are curious about what the Windows based solution would be, we need to create a .reg registry file. Open Notepad, and paste this into it:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTimeZoneInformation]
“RealTimeIsUniversal”=dword:00000001

Next, save that file as “WindowsTimeFix.reg” and exit Notepad. Then, navigate your file browser to wherever you saved the file we just made, and double click it. A box will pop up essentially asking if you want to proceed, tell it that you do.

Once that is done, you’ll also want to disable Windows syncing the time. To do this, you’ll want to go to your services application by clicking your start menu and typing “services.msc”, and clicking “Services.” Once there, scroll down until you find “Windows Time” and right click it, selecting “Properties.” From here, you’ll want to stop the process, and then disable it as well.

Or, run the command sc config w32time start= disabled from an elevated command prompt instead. To turn the Windows Time service back on at a later point in time, run the command sc config w32time start= auto instead.

Once Windows Time has been stopped and disabled and the registry key has been changed, your Windows will no longer have the time issue whenever you switch back and forth between GNU/Linux.

Note: There is no need to do both of these things, doing so would actually KEEP the problem alive. Please pick whichever solution you feel like doing, and do that one. Do not do both! That’s it! Happy computing!

Summary

Article Name

Fixing incorrect clock / time settings while dual-booting Windows/Linux

Description

Find out how to fix incorrect clock and/or time settings when you you work on dual boot systems running Windows and Linux.

Author

Mike Turcotte

Publisher

Ghacks Technology News

Logo

About Mike Turcotte

Mike Turcotte is a Journalism Student at Conestoga College. Mike loves working with Computers in his spare time, focusing on Systems Administration and Programming.

Powered by WPeMatico

eBay