Clock is constantly off

The clock on the KDE bar in 64 bit 12.2 is off by several hours. Manually fixing it works until next time I boot in.

I still have 32 bit 12.1 and Windows 7 on my system and they work correctly so it is a 12.2 issue.

Even pointing it to a time server fails to keep the clock set to the correct time.

On Fri, 07 Sep 2012 20:46:01 +0000, Eiledon wrote:

> The clock on the KDE bar in 64 bit 12.2 is off by several hours.
> Manually fixing it works until next time I boot in.
>
> I still have 32 bit 12.1 and Windows 7 on my system and they work
> correctly so it is a 12.2 issue.
>
> Even pointing it to a time server fails to keep the clock set to the
> correct time.

This is a known issue if you’ve got the hardware clock set to local time
instead of UTC.

Linux generally expects it to be set to UTC, but there’s a potential bug
(or an actual bug, I don’t recall the specific state of it) that if
you’re not set to UTC, after a reboot the clock comes back off by the
number of hours between you and UTC because it’s still expecting the
clock to be UTC instead of local time.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

I’ve seen what Jim describes only if you alternate booting to Windows and openSUSE (Windows can modify the hardware clock so openSUSE isn’t offset correctly).

I’ve generally resolved by simply setting NTP in both OS, that way instead of relying on the hardware clock the OS syncs to a time server (on the corporate network or Internet) with each bootup. Of course, this requires and active Network connection when the OS tries to reach the timeserver.

HTH,
TS

On 2012-09-08 02:05, Jim Henderson wrote:

> This is a known issue if you’ve got the hardware clock set to local time
> instead of UTC.
>
> Linux generally expects it to be set to UTC, but there’s a potential bug
> (or an actual bug, I don’t recall the specific state of it) that if
> you’re not set to UTC, after a reboot the clock comes back off by the
> number of hours between you and UTC because it’s still expecting the
> clock to be UTC instead of local time.

Yes, there is a bug in 12.2. You need to edit the file /etc/adjtime and change the utc there to
local. Someone has described how to create this file as new with the proper defaults, but I don’t
have a link handy.

Alternatively, you may tell Windows 7 to also use UTC - this is described in the wiki:


http://en.opensuse.org/SDB%3AConfiguring_the_clock

which is what I use now in this laptop.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I always set up this:
https://docs.google.com/open?id=0B3e0lLG3OdqES3dMWkU4VWFJT2s

On 2012-09-08 05:16, caf4926 wrote:
>
> I always set up this:
> https://docs.google.com/open?id=0B3e0lLG3OdqES3dMWkU4VWFJT2s
>
>

Has no effect on this problem in 12.2


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I can confirm I’m seeing some strange clock behaviour (an not windows booting to cause it).

Clock displays UTC time but I want it to display local time.
If I right click and set use ntp server it displays correct time until next boot.
If I go into yast and disable utc time it corrects my problem but on the next boot utc is enabled again and the time is off.

very very annoying bug as I use that clock often.

Has no effect on this problem in 12.2
I wonder what you mean?
You probably missed the point of my post. It had nothing to do with the bug in the installer…

I have no problem now
But I don’t boot in to windows… so maybe windows is the problem

Though if you configure NTP properly, it should all correct itself once you login to SUSE anyway

I also do not boot into wondows.
The failure of ntp to correct the problem was throwing me off as it was not a behaviour I observed in 12.1.

However, a very quick and easy fix was simply for me to set the bios time to UTC time and now my local clock displays the correct time on boot.

There is something buggy in the clock though as it did not respect my setting to disable utc in yast and renabled it every time I rebooted.
Having the bios clock set to utc somewhat negates the need to disable it now though.

The solution below worked for me:
From here: http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/477670-12-2-rc2-system-time-always-2-hours-after-reboot.html#post2481849

For a LOCAL Setting Do this (recommended for users that DO dual boot with Windows):

 Code:

sudo echo -e “0.0 0 0.0
0
LOCAL” > /etc/adjtime

On 2012-09-08 14:36, tweakhound wrote:
>
> The solution below worked for me:
> From here: http://tinyurl.com/8wj3odm

As I said several posts back.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On 2012-09-08 16:38, Carlos E. R. wrote:
> On 2012-09-08 14:36, tweakhound wrote:
>>
>> The solution below worked for me:
>> From here: http://tinyurl.com/8wj3odm
>
> As I said several posts back.
>

For the complete, authoritative, answer, read here:


<https://bugzilla.novell.com/show_bug.cgi?id=450196#c93>


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

It acts the same way with NTP and also if I just reboot straight into opensuse. How much off it is varies, from 6-18 hours. This behavior does not exist in 12.1 so this is definitely a bug like Jim said, hopefully it will be resolved soon.

Thanks Caf, that appears to have fixed the issue.

Not sure why Windows is keeps being brought up as this behaviour is present in 12.2 only, with or with dual booting.

I will also say i have encountered this issue, and it was also present in other distros. It woas very annoying, i’d set it and it’d reset on every reboot.
I fixed mine by opening Yast and adjusting the utc time. This through my data partition out of whack though because things had been saved on a time before that time had even existed according to the computer, and on reboot i needed to repair the disk, but that was easy, and the screen even said how.

Thanks very much! Looks like this solution has worked for me for openSUSE 12.2 on two different computers.

Yes - It should

Enjoy!

On 2012-09-08 22:16, Eiledon wrote:
>
> Thanks Caf, that appears to have fixed the issue.
>
> Not sure why Windows is keeps being brought up as this behaviour is
> present in 12.2 only, with or with dual booting.

Because the only valid reason for using local time on the cmos clock is that you double boot to a
system that needs that, like Windows.

And, this problem is present when you use local time in the cmos.

If you do not double boot, DO NOT use local time.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I think the problem is probably a lot of people (like myself ) have done away with windows so get a little confused with the talk of the problem being caused by windows.
Most people using OS probably initially bought their hardware with windows installed and while they may have removed it have probably never thought to go into the BIOS and set the clock to UTC time.

So, if you do not double boot with Windows - reset your BIOS to UTC and problems solved.
Otherwise a good choice if you do double boot is to apply the registry patch to windows to stop it resetting the BIOS clock (linked earlier in the thread)