Time update in Kubuntu changes Windows time.

Asked by matt-d3 on 2006-12-26

I have a Toshiba laptop dual booting Windows Media and Kubuntu 6.1. If I set my preferences in Kubuntu to automatically update time by the internet my time settings in Windows change by 6 hours. Then when I correct the time in Windows my time changes in Kubuntu by 6 hours the other way. I assume this is related to the time base being UTC. I can prevent this by turning off auto time updates in both OS's but that isn't my question. How are the 2 OS's able to change the time in each other and does that mean that they can change other settings that might be more subtle and perhaps dangerous? I've checked the time in the bios and it remains correct. I posted this in the bug section and was told to post it here. Thanks for your help!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Jones
Solved:
2006-12-28
Last query:
2006-12-28
Last reply:
2006-12-27
matt-d3 (matt-d3) said : #1

My apologies, fairly obvious I suppose that I'm new here. I didn't see a post button and thought the add was it!?

Best Alexander Jones (alex-weej) said : #2

Ubuntu assumes that your hardware clock is set to UTC (Universal Time Coordinated).

Windows assumes that your hardware clock is set to local time.

Naturally, we're "right", but as there's apparently no way to configure Windows to use UTC for the hardware clock, you can instead configure Ubuntu to use local time for the hardware clock by modifying "/etc/default/rcS".

----
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=yes
---

Frode M. Døving (frode) said : #3

I think you've set the timezone wrong in one of the operating systems.
Make sure it's the same.

- Frode

Luca Falavigna (dktrkranz) said : #4

Ticket #2936, #2937 and #2938 has been marked as duplicates of this one.

matt-d3 (matt-d3) said : #5

I've confirmed that both operating systems are set to the same time zone. Currently the contents of rcS are UTC=yes. I haven't modified this yet, stumbling over permissions. Root is the owner so I imagine I need to use Sudo and konsole? Each OS displays the correct local time when I let them update automatically from the internet. So Kubuntu must be correcting for the variation from UTC automatically now so will changing the line in rcS to UTC=no affect that result?

williamts99 (williamts99) said : #6

Changing the line will make Ubuntu read and write the hardware clock in Local time instead of UTC. You have to change this in Ubuntu because Windows is not as configurable(even though the 'proper' way is to use UTC). Once you change this setting, both Ubuntu and Windows will see the hardware clock as using 'Local' time, so they won't be fighting each other over the hardware clock.

Best Regards,

Williamts99

matt-d3 (matt-d3) said : #7

User confirmed that the request is solved.

matt-d3 (matt-d3) said : #8

I changed the line to UTC=no and I have both operating systems set to auto update time CST. I have booted to both operating systems 3 times so far and the OS time has remained correct in both systems. Alex, Thanks! My thanks to you all for your help!

thm (thomas-maier) said : #9

I just stumbled over a hint on wiki.osx86project.org which has the following useful information, quoting:

-----

Create a file in Notepad with the following contents:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
     "RealTimeIsUniversal"=dword:00000001

Save it as "Timefix.reg", then double-click on the file to merge it with the registry. Windows will now calculate hardware time based on GMT. Mac OS X does this by default, so your clocks will stay in synch.

-----

So it seems even Windows is configurable and we can do it "the right way". I have not confirmed this, yet, though, because I hardly boot Windows these days.

Thanks for the fix, thm, it worked like a charm on dual boot Ubuntu 6.10 / Windows 2003 Server machine.

pablito (pc-richard) said : #11

I just wanted to offer a word of warning regarding using the registry value RealTimeIsUniversal in Windows. According to the site http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html, it is only partially implemented in 2000 and XP and I came across posts mentioning more problems in Vista. In short, although Microsoft seems to be in the wrong here, I'm quicker to trust the Linux community with a work around to Microsoft's problem on this one.

bryan986 (bryan986) said : #12

How do I stop Ubuntu from changing the hardware clock. It should read it only, not change it at all.

TeatroAbsurdo (teatroabsurdo) said : #13

When I installed Ubuntu on the IBM ultrabay, the XP was out from the machine. The BIOS time is changed forward to 7 hours and after the reboot to the XP...the time was the same: both is wrong..I am in San Francisco! This is not a joke and the question of changing or adjusting the time, because after all: any boot take me back- actually forward- to the wrong time.
If I boot to the XP the time is going back with 7hours and if I boot to Ubuntu the time is going forward...but the time is never right!!!
seven hours back or seven hours forward! The Windows time synchronization gives me error message...and on the Ubuntu; everything is fine all a way up, when I do connect to the Internet...few minutes and the time is changing again...
it is some kind a strange manipulation around the dual boot and I don't like it!
is anyone experienced something like that?
Thank you for any advice!

There is a registry setting which tells windows to use the clock in UTC:

http://www.macosxhints.com/article.php?story=2006072022590888

HKEY_LOCAL_MACHINE
 SYSTEM
  CurrentControlSet
   Control
    TimeZoneInformation
     RealTimeIsUniversal
and set it to a DValue of 1.