Time doesn't survive a reboot

I hope this isn’t a repeat, but my Date & Time is messed up in gnome-shell. The time always is set 4 hours later than it was set at after a reboot. The minutes seem to be fine…just the hours. I have it set Network Time OFF

-I am very impressed with 12.1 as my computer doesn’t lock up anymore. hurray!
-Enabling apache2 from Yast->System Services now works without error
-I had a hard time with Akonadi starting with Kontact. I did quite a few things including using akonadiconsole and reinstalling. It all works now. It may have had to do with not formatting my /home partition.
-I am wondering if reboot under gnome-shell will ever work correctly. If you hit alt and press poweroff, no matter what you hit, including CANCEL has the effect of logging you out and bringing you to the kdm (or gdm/xdm I suppose) where I hit Menu->shutdown->restart.

One last note. I use coretemp to get the temperature of my cpu cores in System Monitor. I added coretemp to Yast->/etc/sysconfig editor->System->kernel->Modules_TO_LOAD_On_BOOT and it doesn’t appear to be doing anything, so I manually have to modprobe coretemp. Usually I would just use lm_sensors to do this but its not available yet ( understandably ) , and I need to know how to load modules on boot anyway. Thanks.

OH, and while I’m at it. I haven’t been able to find this anywhere in the FAQ. when a thread is “SOLVED”, how do you go about changing it to say that? Thanks.

On Fri, 21 Oct 2011 21:06:02 +0000, cw9000 wrote:

> I hope this isn’t a repeat, but my Date & Time is messed up. The time
> always is set 4 hours later than it was set at after a reboot. The
> minutes seem to be fine…just the hours. I have it set Network Time OFF

What time zone are you in?

It sounds like you might be dual booting - is that the case? Some users
who dual boot between Windows and Linux experience problems like this
because one is set to configure the HW clock for UTC, and one is set to
configure it for the local time zone.

If that’s the case, you need to pick one or the other.

Jim


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

Typically, if you are dual-booting with Windows, your RTC will be set to your local time as opposed to UTC, since this is the Windows default. If this is the case, you will need to select Time/Date from YaST, and uncheck the “Hardware Clock Set To UTC” option.

Don’t have Windows loaded to this computer. I have a dual boot with Ubuntu 11.04 but its been months since I booted to that. so I guess not everyone else is having this problem. I’m in Eastern Time Zone, I always choose New York.

I agree, not using the “Hardware Clock Set To UTC” option when dual booting with Windows should work. Other than that, there might be a time related package that needs to be installed such as “ntp - Network Time Protocol daemon”.

On Sat, 22 Oct 2011 00:26:03 +0000, cw9000 wrote:

> Don’t have Windows loaded to this computer. I have a dual boot with
> Ubuntu 11.04 but its been months since I booted to that. so I guess not
> everyone else is having this problem. I’m in Eastern Time Zone, I
> always choose New York.

In that case, do:

su -
(enter root password)
hwclock --systohc

And see if that helps. That will update the hardware clock with the time
in the clock used internally by the OS, and that should resolve the issue
for you.

Jim


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

I did that: hwclock --systohc and rebooted, and it still put me 4 hours ahead. I really thought that was going to do it.

Besides unchecking “Hardware Clock Set To UTC” option, select the “Synchronize with NTP Server” from the “Clock and Time Zone” window after [clicking] the “change” button if you want your computer’s time to auto adjust. Also make sure that “ntp - Network Time Protocol daemon” & “yast2-ntp-client - YaST2 - NTP Client Configuration” are installed.

On Sat, 22 Oct 2011 04:16:02 +0000, cw9000 wrote:

> I did that: hwclock --systohc and rebooted, and it still put me 4
> hours ahead. I really thought that was going to do it.

Sounds like something specific to your hardware, then - what is the
system hardware and configuration?

Jim


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

On 2011-10-22 06:16, cw9000 wrote:
> I did that: hwclock --systohc and rebooted, and it still put me 4
> hours ahead. I really thought that was going to do it.

You have to do that and then delete /etc/adjtime


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I did hwclock --systohc then ran rm /etc/adjtime and rebooted to no avail.
I went into Yast and Date & time “Hardware Clock Set To UTC” was unchecked, and hit the change button and changed it from manual to synchronize with ntp server.
I hit synchronize now. exited, made sure ntp and yast2-ntp-client were installed (they were) and then rebooted, and** the time now stays at the normal time**.
But is it just staying there because it’s getting the time from the network?
If so, then without an internet connection I have to change it back, right? I never had this problem before, working with opensuse since 10.0. I found it kind of comical, actually. my computer doesn’t freeze up anymore, but it can’t compute the time correctly.:slight_smile:

You should be fine now. As a test, you can change it back to manual to make sure the time stays, but unless you have some serious issues with your computer’s RTC, it should be fine. By unchecking “Hardware Clock Set to UTC”, it tells the OS to not apply your time zone offset to the system clock. You could also test this out by going into your BIOS, setting the time to the UTC time, then going back into OpenSuSe’s Time/Date setting and re-checking “Hardware Clock Set to UTC”. It should then display the correct time again. But, unless you have some real need to maintain UTC, you’re better off just leaving things alone now. :wink:

On Sat, 22 Oct 2011 19:26:02 +0000, cw9000 wrote:

> But is it just staying there because it’s getting the time from the
> network?

No - NTP will not change the time if the time difference is > 17 minutes
(as I recall), then ntpd declares the time source as ‘insane’ and won’t
use it to change the clock.

Jim


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

On 2011-10-23 00:15, Jim Henderson wrote:
> No - NTP will not change the time if the time difference is > 17 minutes
> (as I recall), then ntpd declares the time source as ‘insane’ and won’t
> use it to change the clock.

Yes and no. The first step of the script was to do a “jump” or timeset.
After that the daemon was started. However this is not working that way in
11.4, I haven’t investigated it yet.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On Sun, 23 Oct 2011 13:48:06 +0000, Carlos E. R. wrote:

> On 2011-10-23 00:15, Jim Henderson wrote:
>> No - NTP will not change the time if the time difference is > 17
>> minutes (as I recall), then ntpd declares the time source as ‘insane’
>> and won’t use it to change the clock.
>
> Yes and no. The first step of the script was to do a “jump” or timeset.
> After that the daemon was started. However this is not working that way
> in 11.4, I haven’t investigated it yet.

That makes sense. I was referring strictly to how ntpd works - the NTP
daemon (and protocol) have a built-in safety to prevent the time from
being jumped more than 1000 seconds (which is a little over 17 minutes).

Jim

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

Simply, when the OS software starts, it uses the time from the Hardware Clock (computer’s clock in the bios/cmos for most of us using personal computers). To maintain accurate, Hardware Clock time automatically when connected to the internet, select “Set date and time automatically”***** within the OS to synchronize the Hardware Clock with a NTP internet server source. With automatic, NTP source and Hardware Clock synchronization you can use either “Hardware Clock set to UTC” or Local time, depending on system needs and/or personal choice.

***** When connected to the internet the OS will update/adjust the Hardware & OS Clock’s time, (default setting is every 15 minutes).