LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Clock jumps hours ahead after boot. (https://www.linuxquestions.org/questions/linux-software-2/clock-jumps-hours-ahead-after-boot-844173/)

JZL240I-U 11-14-2010 05:42 AM

Clock jumps hours ahead after boot.
 
When I shut down the machine everything is as it should be. Time set from the net, hwclock synced.

When I boot again, time is set several hours into the future. This is an additive process, when I don't set the correct time it drifts with every boot even days into the future (until boot is denied, because files are too far in the future).

I tried to get rid of that behaviour by doing

Code:

sntp -P no -r pool.ntp.org
hwclock --systohc

I renamed /etc/adjtime which looked like this:

Quote:

22292.201093 1289670517 0.000000
1289670480
UTC
Now it looks as follows:

Quote:

0.000000 1289733620 0.000000
1289733620
UTC
To no avail. What could cause that and how can I correct it?

camorri 11-14-2010 06:07 AM

I don't think the atomic clocks are wrong, so that leaves the local clock on your system. When was the last time you changed the cmos battery on the system board? That clock may be drifting if the battery is at or near end of life.

aus9 11-14-2010 06:12 AM

hi

can you state what distro this happens on and is this dual booting with windows?

2) tinycore allows a bootcode to set the timezone ...but link I think wants your locale correctly set.

http://www.tinycorelinux.com/faq.html#timezone

there is also a bootcode of tz=UTC-N

its the reverse of what you think Germany is +

this sign reversal is better explained in the puppy link
http://www.murga-linux.com/puppy/viewtopic.php?p=12690

Maybe you might want to advise your exact timezone locale for someone to figure out your hwclock settting?

JZL240I-U 11-14-2010 07:55 AM

Thanks for your answers.

@camorri: The system is brand new (one month). And it is not drift, since the time is kept accurately during sessions. And it was more or less stable the first few weeks. I'd guess it is a software-thingy.

@aus9: It is OpenSuSE 11.3_64 with no windows(c) (R) ;) at all (there is a FreeBSD installation on a hard disk I salvaged from my old machine, but I can't boot it here).

I suspect the time gets *beep* during shutdown, since the hardware clock is haywire right after a "shutdown -r now". It is also not always (but sometimes) a multiple hours offset (like from the wrong timezone) but an arbitrary interval including an odd number of minutes (and probably seconds, didn't check that).

I use the timezone of "Berlin, Europe" as set up during install and confirmed by KDE right now. (Time is aligned with UTC, see first post). I don't quite get what you are saying with "its the reverse of what you think Germany is +" -- its not politics, I'd guess :D.

As to your links -- umm, they pertain to puppy-specific things, but I use SuSE. And I used the hwclock-commands as shown in my first post in analogy to the second link...

catkin 11-14-2010 08:09 AM

Quote:

Originally Posted by JZL240I-U (Post 4158376)
it is not drift, since the time is kept accurately during sessions

That's based on the incorrect assumption that there is only one hardware clock. This LQ post has an overview of hardware clocks.

JZL240I-U 11-14-2010 08:20 AM

Quote:

No problem if you don't dual boot or you live in a UTC time zone without daylight saving.
And I don't do dual boot. IT is CET time now not anymore CEST.

If you scroll back to my first post (or should I write "complaint"? ;)) you'll notice, that I factored those different time keepings in by first getting the accurate time from the net and then sync'ing it with the hardware clock. And I disabled "ntp" during that, too.

JZL240I-U 11-18-2010 02:01 AM

The solution to the problem is described here:

http://www.linuxquestions.org/questi...utdown-844592/

For those in a hurry: I had a custom initrd not of my making, which lacked some ingredients. Read all about it in the linked thread ;).

P.S.: This is another (unsuccessful) branch of the topic:
http://www.linuxquestions.org/questi...reboot-844338/

P.P.S.: And this is how it began:
http://www.linuxquestions.org/questi...nstall-842262/


All times are GMT -5. The time now is 08:02 PM.