Wednesday, January 30, 2013

Dual Boot Incorrect Clock


Windows / Linux dual boot incorrect system time problem

I always encounter this problem after new installation of Windows / Linux on my PC. If I switch between OSs, Windows shows GMT time instead of local time, although when I check settings, it shows me that local time setting is still OK, for example, I can still see GMT+6 is selected, but the time is wrong. I keep forgetting the fix, so I will be noting it down here for future fix.

After a little bit Google-ing, I found the reason behind this is, Linux or BSD based OSs set BIOS time to UTC / GMT, while Windows sets the clock to local time. So to fix this, either we need to tell Windows to store universal time, or tell Linux to store local time. However, seems like doing this on Windows is easier using "regedit". we will need to add a flag "RealTimeIsUniversal" so that Windows acts accordingly. There is a similar flag which can be used in Linux as well.

For windows fix: go to start menu and write "regedit" (without quotes) on the search box, and hit enter. The regedit.exe will start. Now from left side, navigate to

HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control -> TimeZoneInformation
Now right click on an empty spot on the right side panel and select
New -> DWORD (32bit) Value
Give the name "RealTimeIsUniversal" (without quotes), double click on it, and give the value 1, done! Next time you start Windows after using Linux, the time setting should be fine, at least working fine for me. Also, I've picked this solution instead of changing Linux flags, because, I feel like all clocks should be set to UTC time, so that it creates no problem when using internet.


No comments:

Post a Comment