1

This question already has an answer here:

I recently installed version Windows7 alongside my Ubuntu 14.04 and noticed that despite the time zone being in the correct setting (Pacific Standard time), that the Clock Was off by several hours in Ubuntu. I searched online for answers and read somewhere that deselecting the 'sync with internet clock' might help the issue. It did seem to resolve the issue for the short-term, but after some updates I have noticed once again that my system clock is 7 hours ahead. Looking into the BIOS I discovered that the clock there was being reset.

What brought it to my attention was that my f.Lux in UBuntu wasn't turning on at the right times, so I went and checked the time in BIOS and noticed that it was forward by 7 hours. This explains a few things, ans I suspected its probably the battery, BUT something weird is happening that tells me otherwise.

If I go into BIOS and set the clock to the correct time, and then load into Windows, everything stays fine. I can restart the system into Windows and nothing changes in the BIOS or Windows time. If I log into Ubuntu via the Windows bootloader the time changes in the Ubuntu Clock to be behind 7 hours. If I reboot again into Ubuntu the Ubuntu clock is still off and the BIOS clock is normal. The only time the clock chnage sin the bIOS is when I change the time in UBuntu clock, (either by selecting manaul or internet sync).

What is strange is that after the BIOS is modified to have the wrong time, the clock in Ubuntu will seem correct by displaying the right time. If I fix the time in the BIOS, log straight Into ubuntu wia windows bootloader, the Ubuntu clock will be off.

Its almost as though Ubuntu cant read the BIOS clock properly or sync with it.

Running Windows7 64 bit alongside Ubuntu 14.04 64 bit

marked as duplicate by chaskes, Pilot6, Eric Carvalho, Videonauth, David Foerster Jun 2 '16 at 1:08

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.

1

My understanding may be outdated, but last time I checked Linux assumes that the BIOS clock is in UTC (by default), while Windows assumes it's set to your local time.

If you would like to tell Ubuntu to use local time, which may fix your issues after booting Windows, you will need to edit /etc/default/rcS:

# Set UTC=yes if your hardware clock is set to UTC (GMT)
UTC=no

The alternative is telling Windows that your hardware clock is in UTC, but I'm not familiar with how you'd go about this.

You may find additional information by reading about this similar question.

  • haha I just found the solution while you were typing this out! – Kalamalka Kid May 31 '16 at 21:31
  • for users who wish to change things on the Windows side, see link in my answer. – Kalamalka Kid May 31 '16 at 21:32
2

Found the solution! I read HERE that:

"Operating systems store and retrieve the time in the hardware clock located on your motherboard so that it can keep track of the time even when the system does not have power. Most operating systems (Linux/Unix/Mac) store the time on the hardware clock as UTC by default, though some systems (notably Microsoft Windows) store the time on the hardware clock as the 'local' time. This causes problems in a dual boot system if both systems view the hardware clock differently"

The steps to resolve this issue by making Linux use 'Local' time were to:

gksudo gedit /etc/default/rcS

add or change the following section

# Set UTC=yes if your hardware clock is set to UTC (GMT) UTC=no

  • It's ok to put the part about changing win to utc in the answer, especially since it helps keep ubuntu on utc, which is better. – chaskes May 31 '16 at 22:27

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