Windows and Linux operating systems have different methods for displaying the correct time. Windows uses the Network Time Protocol (NTP) to synchronize its clock with a global time server. Linux, on the other hand, relies on a local clock that can be out of sync with NTP. This can lead to discrepancies in the time displayed on both systems.
To get Windows and Linux clocks to display the correct time, you first need to set up NTP on your system. NTP is free software and can be downloaded from www.ntp.org. Once installed, you will need to configure it so that it syncs with a global time server. To do this, open the NTP configuration utility by typing ntpq at a command prompt or by clicking Start -> Settings -> Control Panel -> System and Security -> Clock and Time -> Clock Configuration in Windows 7 or 8/8.1 or 10, respectively:
Once you have opened the NTP configuration utility, click on the General tab and select Use an Internet Time Server:
Next, type in the IP address of a reliable global time server into the Server field and click OK:
Now restart your computer so that NTP will take effect: Click Start -> Restart button in Windows 7/8/8.1 or 10:
In Linux, you will first need to install chrony if you haven’t already done so: sudo apt-get install chrony If chrony is not already installed on your system, you will also need to configure it using chrony-config as follows: sudo chrony-config –set-timezone America/New_York Next, open a terminal window and type ntpdate -u
Sometimes when you set up a dual-boot system, things can get a bit weird with the time and clock settings, so how do you fix the problem? Today’s SuperUser Q&A post has the perfect solution to help a frustrated reader fix his dual-boot clock woes.
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
Photo courtesy of Straws pulled at random (Flickr).
The Question
SuperUser reader arielnmz wants to know how to get both of the clocks on his dual-boot Windows/Linux setup to display the proper, and matching, times:
What is the best method for fixing arielnmz’s dual-boot clock problem?
Since my time zone is -06:00 CST, I assume Linux just sets the RTC’s time to UTC and re-calculates the time based on the time zone whereas Windows just sets the RTC to the time for the time zone. Both use the same NTP server to synchronize the time.
My question is, which one is doing the right thing? On which one should I set the time zone setting to UTC in order to have the right time on both?
The Answer
SuperUser contributor Ayan Patra has the answer for us:
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.
I started with Linux first. Run the following commands as root:
ntpdate pool. ntp. org
This will update your time if it is not set correctly.
Now set the hardware clock to UTC with this command.
hwclock –systohc –utc
Source
Now boot to Windows and add the following to the registry. Simply create a .reg file using the code below in Notepad. Save it and run it.
Windows Registry Editor Version 5. 00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] “RealTimeIsUniversal”=dword:00000001
Source
From the next boot onward, both operating systems will show you the correct time.