LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   system clock resets self at boot (https://www.linuxquestions.org/questions/linux-newbie-8/system-clock-resets-self-at-boot-345094/)

pearman 07-20-2005 02:35 PM

system clock resets self at boot
 
Does anyone have an idea about how to set the system clock at boot? Here's what happens to me.

I moved from the eastern time zone in N. America to Central European time zone.

I reset the time zone using the KDE date/time utility. I reset the time to the local time, as root, using

me@home:date MMDDhhmm

me@home: date gives me the correct time.

I then re-boot

now the time on the monitor clock is -6 hours off from local time after reboot, i.e. back to eastern North America time.

me@home: tzconfig still gives me the correct time zone (Europe/Zurich)

me@home: date gives me local time -6 hours, i.e. Eastern North American time.

I rebooted and went into BIOS and configured the system time to the local European time manually, then continued booting. When the boot sequence was done, the system time was reset to local -6 hours.

After correcting the time with

me@home: date MMDDhhmm

I did and got the following:

me@home: ntpdate tack.meteonews.ch
20 Jul 15:28:20 ntpdate[2891]: step time server 62.2.104.140 offset -21600.751412 sec

Does anyone have an idea what is going on, and how I can correct the system (and hardware) time and have them stay corrected? I'll much appreciate any ideas.

comprookie2000 07-20-2005 03:12 PM

What distro?

pearman 07-20-2005 03:28 PM

I used a Knoppix CD to install, which I guess means it's a debian mixed distro. I'm using the 2.4.26 kernel.

comprookie2000 07-20-2005 04:20 PM

Whats;
$ cat /etc/timezone
say?
also you can look in;
/etc/default/rcS
to see if you are set to "local" or "UTC"
Thats for debian;
http://www.debian.org/doc/manuals/sy...dmin-time.html

pearman 07-20-2005 05:57 PM

me@home:~$ cat /etc/timezone
Europe/Zurich

Also:

UTC=no

Like I wrote, I can fix things with date MMDDhhmm, but then upon reboot, the clock is back where it was.

Could KDE somehow be causing this?

foo_bar_foo 07-20-2005 11:38 PM

after you set time
as root

hwclock --systohc --localtime

should fix you up

pearman 07-21-2005 03:05 AM

This is weird:
root@PBPhome:/home/peter# tzconfig
Your current time zone is set to Europe/Zurich
Do you want to change that? [n]: n
Your time zone will not be changed

root@PBPhome:/home/peter# date
Thu Jul 21 03:51:43 EDT 2005

so:
Your current time zone is set to Europe/Zurich
Do you want to change that? [n]: y

Please enter the number of the geographic area in which you live:


1) Africa 7) Australia

2) America 8) Europe

3) US time zones 9) Indian Ocean

4) Canada time zones 10) Pacific Ocean

5) Asia 11) Use System V style time zones

6) Atlantic Ocean 12) None of the above


Then you will be shown a list of cities which represent the time zone
in which they are located. You should choose a city in your time zone.

Number: 8

Amsterdam Andorra Athens Belfast Belgrade Berlin Bratislava Brussels
Bucharest Budapest Chisinau Copenhagen Dublin Gibraltar Helsinki Istanbul
Kaliningrad Kiev Lisbon Ljubljana London Luxembourg Madrid Malta Mariehamn
Minsk Monaco Moscow Nicosia Oslo Paris Prague Riga Rome Samara San_Marino
Sarajevo Simferopol Skopje Sofia Stockholm Tallinn Tirane Tiraspol
Uzhgorod Vaduz Vatican Vienna Vilnius Warsaw Zagreb Zaporozhye Zurich

Please enter the name of one of these cities or zones
You just need to type enough letters to resolve ambiguities
Press Enter to view all of them again
Name: [] Zurich
Your default time zone is set to 'Europe/Zurich'.
Local time is now: Thu Jul 21 09:52:41 CEST 2005.
Universal Time is now: Thu Jul 21 07:52:41 UTC 2005.


I.E Although tzconfig shows time zone as Europe/Zurich, date shows time zone as EDT

so I redid tzconfig, choosing Europe/Zurich again. Now time zone appears to be set in date, as follows

root@PBPhome:/home/peter# date
Thu Jul 21 09:52:56 CEST 2005

then

root@PBPhome:/home/peter# ntpdate tack.meteonews.ch
21 Jul 09:55:10 ntpdate[3346]: adjust time server 62.2.104.140 offset 0.003413 sec
root@PBPhome:/home/peter# hwclock --systohc --localtime
root@PBPhome:/home/peter# date
Thu Jul 21 09:56:03 CEST 2005

At this point, both the time zone and date/time appear correctly to the actual local time. The hardware clock has been set to this time. Now, reboot.

pearman 07-21-2005 03:31 AM

after reboot, I get

peter@PBPhome:~$ date
Thu Jul 21 04:11:21 EDT 2005
peter@PBPhome:~$ hwclock
Thu Jul 21 10:15:36 2005 -0.475333 seconds
peter@PBPhome:~$ tzconfig
Your current time zone is set to Europe/Zurich
Do you want to change that? [n]: n
Your time zone will not be changed

so then

root@PBPhome:/home/peter# hwclock --hctosys
root@PBPhome:/home/peter# date
Thu Jul 21 10:20:12 EDT 2005

the local time is correct, but the time zone shown is wrong

nonetheless,

root@PBPhome:/home/peter# tzconfig
Your current time zone is set to Europe/Zurich
Do you want to change that? [n]: n
Your time zone will not be changed

So the system shows the correct information, but KDE date/time utility shows set to Eastern Daylight Time. Adjust KDE to CEST and correct time in this time zone. Now KDE agrees with info returned by 'date' and 'tzconfig'. So, reboot and pray.

pearman 07-21-2005 03:53 AM

After reboot,

peter@PBPhome:~$ date
Thu Jul 21 04:38:34 EDT 2005
peter@PBPhome:~$ tzconfig
Your current time zone is set to Europe/Zurich
Do you want to change that? [n]: n
Your time zone will not be changed
peter@PBPhome:~$ hwclock
Thu Jul 21 10:39:48 2005 -0.818138 seconds
peter@PBPhome:~$

KDE shows local time minus 6 hours and its current time zone has returned to EDT.

I conclude that there is a KDE file that holds EDT as the time zone and upon starting KDE something reads this file and resets system time and time zone.

Two questions: Does anyone know where KDE might look for this info? Also, how would I look for it? I would assume to start that it's somewhere in /etc/kde3.


All times are GMT -5. The time now is 01:19 PM.