Day 43 - MISSED; Clock issues on Windows-Ubuntu Dual Boot
01 Apr 2017 100daysofwritingAh, this is going to be my sixth MISSED post. The irony of it all is that yesterday, I really had a topic to write about. A topic that a friend asked me about earlier in the day and one that I have faced many times myself. Uh, irony.
Managing your Clock on Windows-Ubuntu Dual Boot
Switching over to Windows and seeing the wrong time or switching to Ubuntu and seeing the wrong time, it’s all pretty irritating. It keeps happening, there’s no easy way to fix that, this is my recipe. It’s pretty easy, I think.
- Turn off the Update time from Internet option on all your operating systems
- Boot into Windows, and open the registry editor. (
WinKey + R
followed byregedit
in the text box) - Edit this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
- Right-click in the right-side panel and select New > DWORD Value. Create the
key named
RealTimeIsUniversal
and give it a value of 1. - Now, restart your computer and boot into Ubuntu. We will set the Hardware clock to UTC time.
- Open a terminal, you need root privileges on your machine
- Let’s start with the basics. Run
sudo hwclock --show
, this should show you the current time that’s stored in your hardware clock - Set this to the current UTC which should be available to you through your
phone or the Internet. (Read further to see how to do this from a great GUI)
hwclock
supports the GREAT feature of copying over time from the system- So, open the calendar / date-time GUI application and set the proper time there.
- Make sure automatic updation of the time from the internet is turned off
- Once you have set the proper time for your timezone in the window, you can
run
sudo hwclock --systohc
. This will copy over the current system time to the hardware clock. - You should also probably run
sudo hwclock --utc
to make sure that the hardware clock is kept in UTC
- Open the file
/etc/default/rcS
andUTC=yes
to that file - You are SET now!
This guide serves as an enhancement to the two pages that I have in my bookmarks bar under the folder Clock issues (Yeah, right, that’s how big a problem this was)
Windows-Linux Dual Boot System Issues on mikebeach.org
Examples of using hwclock on thegeekstuff.com
That’s the end of my tutorial for the most part, a couple of quick points about this setup.
The main problem here is that Linux interprets the Hardware clock to be set in UTC whereas Windows assumes it to be in Local time by default, this creates the initial inconsistency.
Automatica time updation from the internet probably changes the hardware clock right after startup and right before shutdown instead of changing it once? I don’t know anything about this, but I have a feeling that this also works differently in both operating systems. Simply turning it off and adjusting for the drift of the hardware clock every year or something as infrequent as that will ensure that the setup is simple! (This also enables freely changing the timezone on whichever operating system, that should not affect the hardware clock at all)
POST #43 is OVER