none
Windows 7 Internet Time Update and RealTimeIsUniversal (UTC) registry hack

    Question

  • I believe I've discovered a problem with internet time sync when the RealTimeIsUniversal registry key is set to "true".

    In a default Windows install, the real time clock (RTC) is expected to be in local time. If you sync to an internet time server in this default configuration, once the time is synced Windows will write the correct time back to the CMOS RTC as expected.

    However, if the RTC is in UTC and you have enabled the RealTimeIsUniversal key, the correct time is no longer written to the CMOS RTC after internet time sync. You can still sync to an internet time server and the time will be displayed correctly for a short while, but the correct time is not written to CMOS, and generally within an hour the kernel will re-read the (incorrect) time from the CMOS RTC and your time will be off again. There appears to be no way to get the correct time from a time server to write to the CMOS RTC.
    Is there any way to fix this so that the correct time is written to the RTC when you set it to use UTC?
    I do know that the RealTimeIsUniversal registry key is not "supported", but since it does exist and people are obviously using it, it would be nice if it were moved to supported status eventually and worked correctly.


    Friday, January 27, 2012 11:37 PM

All replies

  • Hi,

    Windows tries to sync time exactly every hour (starting 1h after boot) with the hardware CMOS clock as long as you either don't have NTP configured or none of the configured NTP server(s) is reachable.

    This is what I found from MSDN and I hope it will be helpful:

    RealTimeIsUniversal key changes is how the kernel interprets the Real-Time Clock (RTC) from the motherboard and how it keeps it synchronized when a user/application (like the NTP service) changes the system time. Note that the BIOS does not have a "time zone setting" one can set. It's up to the OS to keep track of this.
     
    When this feature is enabled, the RTC will be interpreted as UTC time. This means setting the clock to something other that UTC time will cause "local time" to be wrong. Luckily, just setting the time in the time\date CPL will "fix" this for the user.
     
    When activated, it requires a reboot or hibernate/resume to take effect. AND THEN you need to set your current local time to the right time to force the kernel write out the system time in UTC to the RTC.
     
    That said, I haven't tried it while hibernating and resuming. It's mostly used on servers that stay up 24/7.
     
    Also, if you are dual-booting, all bets are off. The two OSes can't talk to each other so their interpretation of the RTC and thus how they write out the time to them will mess each other up.

    Windows Time Service Technical Reference
    http://msdn.microsoft.com/en-us/library/bb608215.aspx

    W32Time Global Configuration Settings
    http://blogs.msdn.com/b/w32time/archive/2009/02/02/group-policy-settings-explained.aspx

    Windows Time Service
    http://blogs.msdn.com/b/w32time/


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, February 03, 2012 11:30 AM
  • The problem seems to be in that step when setting the local time. I can manually set the local time in Windows and it will be reflected in the RTC. However, when I attempt to set the time from the internet, the RTC is not updated.

    What I suspect is that there is a setting in Windows that tells it not to write to the RTC if the time from the internet is off by too much, and it is erroring by comparing the internet time to the UTC time, i.e. my time zone is UTC-6 so when it checks for an update, it sees a time that is 6 hours off, thinks it is wrong, and doesn't update the RTC. Just a wild guess though.

    Sunday, February 05, 2012 5:57 PM
  • I'm afraid there is no fix to the issue...so far not practical with Windows (i.e., the time is wrong after wake up a suspended/hibernating)


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, February 06, 2012 2:02 PM
  • Does anyone know if there are any updates to this issue?  It seems that Microsoft recommends using the RealTimeIsUniversal key but then this bug prevents it from working correctly.

    See: http://msdn.microsoft.com/en-us/library/ff793798%28v=winembedded.60%29.aspx

    Friday, March 22, 2013 5:13 AM