Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Today I was installing Windows 7 on the same computer I have Ubuntu. For some reason, after installing Windows 7 and going back to Ubuntu the time went from the correct hour at that moment, 12:30PM to 7:30AM. This happened after installing Windows 7. For what I understand the BIOS has a time set, Ubuntu has the same time that is shown in the BIOS when installing it. At least up to this point is what I have seen. Now after installing Windows 7 (And believe me this is only for testing the performance of Windows 7 against Ubuntu in which case Windows 7 is falling behind a lot on the same hardware) the time changes in Ubuntu to the wrong one that is set in Windows 7.

I actually do not change the time in Windows 7 since this is one of the checks I am doing to see if the operating system can correctly grab the time. Windows 7 fails. Ubuntu does not BUT Windows 7 actually changes the time for Ubuntu if I boot with it afterwards.

So my question is, why/how does time change in Ubuntu after installing Windows.

NOTE - I have set Ubuntu time to "manual" instead of grabbing it from the Internet just to test out this.

share|improve this question

marked as duplicate by Eliah Kagan, Luis Alvarado Sep 9 '14 at 21:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 22 down vote accepted

Because of the way the two operating systems set the hardware clock. by Default ubuntu uses UTC, and windows localtime.

So when you shut down, your hard ware clock is set to say "13:00". When you boot, windows sees "13:00" as localtime, so 1 PM, but Ubuntu sees that as UTC and so converts the time back from UTC to local time.

You can fix this by either asking windows to set the hardware clock with UTC, or Ubuntu to use localtime.

to make the change in Ubuntu, edit edit /etc/default/rcS and change

UTC=yes to no, like this:

# assume that the BIOS clock is set to UTC time (recommended)


share|improve this answer
Thanks for the elaboration. It would be much more clear to the asker now. – tinhed Dec 26 '11 at 5:38
Indeed very well elaborated. You solved all my doubts about it. – Luis Alvarado Dec 26 '11 at 13:53

This has to deal with hardware clock being set to UTC (GMT). Ubuntu Correctly reads the local time by adding/subtracting time from your local clock. Windows does not use UTC and thus messes up the time. Have a look

Though the documentation is old, it is still relevant.

share|improve this answer

If you have Windows 7 and have installed Service Pack 2, you can use a registry hack to set Windows to use UTC. If you need the registry hack, make sure you get it from the Microsoft website. If you don't know what this means, use the UTC=no method in /etc/default/rcS in the answer from Bodhi Zazen.

I don't know about Windows 8, though.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.