LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2005, 02:35 PM   #1
pearman
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Rep: Reputation: 15
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.
 
Old 07-20-2005, 03:12 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
What distro?
 
Old 07-20-2005, 03:28 PM   #3
pearman
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
Old 07-20-2005, 04:20 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
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

Last edited by comprookie2000; 07-20-2005 at 04:23 PM.
 
Old 07-20-2005, 05:57 PM   #5
pearman
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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?
 
Old 07-20-2005, 11:38 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
after you set time
as root

hwclock --systohc --localtime

should fix you up
 
Old 07-21-2005, 03:05 AM   #7
pearman
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
Old 07-21-2005, 03:31 AM   #8
pearman
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
Old 07-21-2005, 03:53 AM   #9
pearman
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
system clock,hardware clock varunbihani Linux - Newbie 2 07-23-2005 09:04 AM
System resets itself! NMI error?! xianzai Fedora 1 04-06-2005 12:53 PM
trouble setting system clock on boot vortical Linux - Software 0 12-11-2003 07:16 PM
system clock on dual boot luap Linux - General 7 03-17-2003 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration