Google Analytics

Thursday, June 29, 2006

Storing system time in UTC in Windows XP

A friend of mine came across an article describing how to store the system time as UTC in Windows XP.

This is helpful for me because I have several machines that dual boot between Linux and Windows XP, and one that dual boots between OS X and Windows XP. Linux and OS X like to store the time as UTC, while Windows likes to store your local time (e.g. UTC+10). Most Linux distros provide an easy-ish way of storing local time instead of UTC, allowing you to boot into Windows without experiencing a time warp. However, OS X doesn't (to my knowledge) allow this -- which is probably a good thing.

The magic key is at:
HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal
It's a DWORD that needs to be set to 1 (I had to create it). Of course, you need to reboot afterwards.

There have been reports of side-effects, but so far it seems OK for me.

3 comments:

Anonymous said...

I can't lie I didn't read your blog but you have one hell of a great name!

my blog: http://mikeknight.blogspot.com

John said...
This comment has been removed by the author.
John said...

I thought this had worked for me with Windows Vista 64-bit, but after a couple restarts the time was never correct in Windows. It's better to fix the problem in Linux if you're dual booting Linux and Vista:

sudo gedit /etc/default/rcS
change UTC to 'no'

Sources:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/278429
http://www.go2linux.org/tmp_erase_files_frequency_utc_or_local
http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html