BIOS clock setup with dual boot

In the “practices” category, I describe how I do things.  This may not be the only way or even the best way.  When making your plans, it is sometimes useful to know what others do.

I have been primarily using unix (sometimes linux, sometimes solaris), since around 1996.  But I have dual booted or multi-booted with other systems including Windows.  And that can lead to confusion and inconsistencies in how the BIOS clock (the CMOS clock) is set.  For unix systems, it is best to set the CMOS clock to UTC (universal coordinated time, Greenwich mean time, GMT).  But Windows likes to have the clock set to local time.

Linux and solaris can both manage with the clock set to local time.  And that’s what I did for many years.  However, with multi-booting, you run into the problem of each operating system wanting to adjust the clock to daylight savings time, so the clock finishes up being advanced twice (or more) in spring and set back twice (or more) in fall.

In order to avoid those problems, I would configure my Windows systems to never adjust the clock for daylight savings, so that my unix systems would control the CMOS clock time.  That worked fine up through Win2K.  But things went wrong with WinXP.  It seemed that linux would correctly advance the clock to change to daylight savings time.  But the next time I booted Windows, it would insist on setting it back to standard time.  Sigh!  So I had to allow WinXP to also change to daylight savings time, and put up with clock confusion twice a year.

I became tired of that, and decided to switch to using only UTC for the CMOS clock.  When running linux, the clock displayed as local time.  But when I booted to Windows, it would show UTC.  That was a price worth paying for avoiding the twice-a-year confusion.

It turned out that there was a better way.  In newer versions of Windows, it is possible to use local time but still have the CMOS clock set to UTC.  Here’s how:

Define a registry entry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal

as a dword, and set that value to be 1 (or 0001).

This works well in Vista and in Windows 7.  It is a bit iffy in WinXP and it might not work at all in earlier systems than XP.  With this setting, Windows is able to display the configured local time, while you can leave the BIOS clock (CMOS clock) set to UTC.

If you try this, I recommend that you tell Windows to never synchronize your clock to Internet time.  It sometimes gets that wrong.  Have your linux or unix system keep your clock sychronized.

I originally tried the same registry trick with two WinXP systems.  One is my desktop, where I triple-boot Linux, WinXP, Vista.  The other is an older laptop.  It is working in the desktop, but it went badly wrong in the laptop.  Whenever the computer would go into sleep mode, it would mess up the time settings.  I have my desktop set to never go to sleep mode, which is why I don’t have problems with it.  But the laptop needs to go into sleep mode if idle when running on battery.

I finished up with the older laptop set to UTC, so that when running WinXP the displayed time is UTC.  For my other systems, the CMOS clock is UTC but the display still shows local time.

Advertisements

About Neil Rickert

Mathematician and computer scientist who dabbles in cognitive science.

6 responses to “BIOS clock setup with dual boot”

  1. gtr says :

    Thank you; this saved me from a long-time annoyance! No more having to remember that my Windows clock is an hour slower than my Debian one and ending up staying up too late!

    Like

    • gtr says :

      Scratch that… after a short while of running windows inexplicably subtracts an hour from the displayed time… even though RealTimeIsUniversal is set and DST adjustment turned off… I guess that’s what’s meant by “a bit iffy in WinXP” 😦

      Thanks anyway, but I guess Microsoft have doomed all us dualbooters to timezone hell..

      Like

      • Neil Rickert says :

        I had that “one hour off” problem with Windows 7. That’s why I recommended “that you tell Windows to never synchronize your clock to Internet time.” It seems that Windows bungles the handling of daylight savings when synchronizing.” But it worked fine (and continues to work fine), as long as I do the synchronizing only in linux.

        Perhaps XP has an even worse version of that problem – that is, maybe it gets it wrong even when not synchronizing with Internet time.

        The difficulty that I had with XP was only on a laptop. Whenever the laptop went into sleep mode, it would wake up with the time wrong. The XP on my desktop is set to never go to sleep mode, so it is not a problem there.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: