Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a dual boot system with Win 7 / Ubuntu 13.04. For some reason, Ubuntu resets the system time to -3 hours regardless of timezone settings. I thought that this was UTC problem, but the problem persists regardless of what is set in /etc/default/rcS.

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

If I check the timezone with date +%Z it states

UTC

However, when using the graphical user interface to check the timezone it shows that I'm in the right timezone.

Date gives me

pe 9.8.2013 13.51.52 +0000

While hwclock is the correct time

pe  9. elokuuta 2013 16.52.03  -0.516733 sekuntia

Ubuntu seems to set the BIOS time to wrong time. This happens on every boot, even after I've manually changed the time. Windows 7 does not have this problem. I could not find duplicates or solutions beyond the UTC settings.

The system is set to manual time and is not updating it from the internet. I've already tried that but it seems that it never updates so I'm stuck in the wrong time.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

To avoid this, change time to manually instead of Automatically from the internet

enter image description here

enter image description here

Try this:

Remove/Purge ntp
Remove/Purge ntpdate
Install ntpdate
set UTC=yes in /etc/default/rcS
reboot
sudo ln -f -s /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
share|improve this answer
    
That is an excellent advice, except that it was already set to manual. Sorry for not mentioning it in the post. Any other suggestions? Edit: Wouldn't that also set it to the right time, in case the time zone was right? (It is, but it is not updating to the right time.) –  krax Aug 10 '13 at 7:51
    
Manual will not update from the net. Once its set, it will not update. Try changing the BIOS battery. –  Mitch Aug 10 '13 at 8:28
    
If the BIOS battery was done there would be other symptoms and it would not reset to current time -3. Also, there would also be problems in Windows, not just Ubuntu. –  krax Aug 10 '13 at 9:50
    
My mistake. I did not see that about Windows. What time zone are you in? Do you have NTP installed? –  Mitch Aug 10 '13 at 9:55
    
It is. ntpdate -q gives me 10 Aug 10:01:19 ntpdate[5191]: no servers can be used, exiting. –  krax Aug 10 '13 at 10:02
show 6 more comments

It sounds like you are in a timezone 3 hours separate from UTC, and Windows and Linux are disagreeing about what time should be stored in the BIOS.

Linux stores time as UTC in the BIOS clock.

Windows stores time as local time.

So whenever you boot Windows, it resets the BIOS clock to local time, Linux loads it and assumes it's UTC.

I was under the impression that the Ubuntu installer would detect Windows and set Linux to compromise by using local time in the BIOS... but this may not be true, or may not have happened correctly.

There are two solutions :

  • Set Windows to use UTC in the BIOS clock

This apparently has some caveats for "professional" usage but might be satisfactory from a user POV.

http://superuser.com/questions/185773/does-windows-7-support-utc-as-bios-time

  • Set Linux to use local time in the BIOS clock

Set the UTC setting in /etc/default/rcS to "no" (on Ubuntu)

share|improve this answer
    
It would be helpful if you read the problem before answering. In my question I explicitly stated that I thought that this was UTC problem, but the problem persists regardless of what is set in /etc/default/rcS. –  krax Aug 10 '13 at 9:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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