LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 04-07-2006, 08:06 AM   #1
ltcolfury
LQ Newbie
 
Registered: Nov 2005
Posts: 22

Rep: Reputation: 15
Clock Time incorrect after shutting down...


Hello, I am using Suse 10, KDE 3.4.2. I have a strange thing happening.

Ever since the "Time Change" last week (I am in US EST) my clock hasn't worked correctly. Every time I start the computer OR restart it, the time stays the same as it was when I shut it down. I then have to set it manually again. (I have it set to Local Time. I've also tried UTC time and it does the same thing.)

I have a separate Hard Drive with M$ XP and that works fine.

Would you have any idea why this suddenly occurred?

Thank you much in advance.
 
Old 04-07-2006, 09:19 AM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 530

Rep: Reputation: 50
I don't understand clearly what you mean by 'the time stays the same as it was when I shut it down'.
Do you mean the clock stops functioning? or the clock returns to winter time?
And is your machine a dual-boot machine Linux/Windows?
 
Old 04-07-2006, 10:14 AM   #3
ltcolfury
LQ Newbie
 
Registered: Nov 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by berbae
I don't understand clearly what you mean by 'the time stays the same as it was when I shut it down'.
Do you mean the clock stops functioning? or the clock returns to winter time?
And is your machine a dual-boot machine Linux/Windows?
Do you mean the clock stops functioning?
Yes, it stops functioning. It'll actually stay the same time as it was when I reboot/shut down. For example...If I reboot or shut down now (11:10am) It'll be 11:10am when it boots back up and then it'll start working normally.

I have a dual boot PC. Dell 8400 P4 2GB RAM. I have 1 HD Windows the other Suse Linux 10 which I've had installed since its release. I rarely boot into Windows but I did boot to it to see if the clock works and it is fine. That's why I find this situation odd.
 
Old 04-07-2006, 12:36 PM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 530

Rep: Reputation: 50
You said 'Ever since the "Time Change" last week (I am in US EST) my clock hasn't worked correctly.'
I presume that means the clock ran correctly between boots under Linux, before that time. Am I right on this point?
And how did you make the change towards Summer Daylight Saving time?
Your problem seems weird, especially if it was working well before the time change.

Last edited by berbae; 04-07-2006 at 12:39 PM.
 
Old 04-07-2006, 06:06 PM   #5
ltcolfury
LQ Newbie
 
Registered: Nov 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by berbae
You said 'Ever since the "Time Change" last week (I am in US EST) my clock hasn't worked correctly.'
I presume that means the clock ran correctly between boots under Linux, before that time. Am I right on this point?
And how did you make the change towards Summer Daylight Saving time?
Your problem seems weird, especially if it was working well before the time change.
Yes, that is correct. Ever since the time change last week, it hasn't worked correctly. Before that, it worked fine. Last Sunday morning I checked the time and it was correct. (It automatically chnaged to Summer time) I then went about my business as usual. I then booted into Windows Monday morning (For work logs) and noticed that the time wasn't correct. I then changed it manually. Booted into Suse 10, and the time was still at the time that I left it at.

I went into my BIOS and made sure the date and time were correct. (Off maybe by a few minutes) I then changed it.

I adjust the time in Suse by right clicking the clock... Adjust Date & Time. I have it set to Local time Eastern USA. I tried using the UTC as well but that didn't work either.

I really find this odd. Windows is fine keeping the time but for some really strange reason Suse stopped. I just thought I'd ask to see if anyone heard or had this issue before.

Could the battery be bad in the PC? (CMOS) I would find that hard to believe since Windows' time is fine and the PC is only about 15 months old. I'm at a loss for any ideas.
 
Old 04-07-2006, 06:40 PM   #6
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 45
I have had some similar problems in the past with both windows and linux and the correct time. I now use the Network Time Protocal to automatically set the time on my computer usine a Time Server. It's easy and works very well.


http://www.ntp.org/

KC
 
Old 04-08-2006, 10:46 AM   #7
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 530

Rep: Reputation: 50
Next time you reboot to Linux, run under root in a console, before changing any time:
Code:
hwclock --show
then
Code:
date
The first command shows the BIOS clock and the second the system clock.
Tell if they show the same time or not, and if the first gives the right time.

When you right-click on the clock and change the time, you only change the system clock, not the BIOS clock.
Maybe there's a problem with syncing the system clock with the BIOS clock at startup. That's why I ask you the result of the commands above.
 
Old 04-09-2006, 04:56 PM   #8
ltcolfury
LQ Newbie
 
Registered: Nov 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by berbae
Next time you reboot to Linux, run under root in a console, before changing any time:
Code:
hwclock --show
then
Code:
date
The first command shows the BIOS clock and the second the system clock.
Tell if they show the same time or not, and if the first gives the right time.

When you right-click on the clock and change the time, you only change the system clock, not the BIOS clock.
Maybe there's a problem with syncing the system clock with the BIOS clock at startup. That's why I ask you the result of the commands above.
The times and dates are different when I run both of those commands. Do you know how I could sync both of those back again? I hadn't booted into Linux since yesterday due to work stuff, but it still had yesterdays time and date when I shut down.
 
Old 04-09-2006, 06:27 PM   #9
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 49
As root do "hwclock --help" and it will tell you how.
 
Old 04-10-2006, 04:03 AM   #10
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 530

Rep: Reputation: 50
First check if you have a file named '/etc/adjtime', if so do in a console under root:
Code:
echo "0.0 0 0.0" > /etc/adjtime
it is to reset the automatic adjustment by the hwclock command (see man hwclock)
I presume from what you said that the BIOS clock gives the right time
if so and if the clock is set to local time in Linux, then run:
Code:
/sbin/hwclock --hctosys --localtime
Because for a dual boot machine the BIOS clock should be set to local time, as this is the way Windows works with the hardware clock.
Tell if the command gives you an error message.
 
Old 04-10-2006, 08:37 AM   #11
ltcolfury
LQ Newbie
 
Registered: Nov 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by berbae
First check if you have a file named '/etc/adjtime', if so do in a console under root:
Code:
echo "0.0 0 0.0" > /etc/adjtime
it is to reset the automatic adjustment by the hwclock command (see man hwclock)
I presume from what you said that the BIOS clock gives the right time
if so and if the clock is set to local time in Linux, then run:
Code:
/sbin/hwclock --hctosys --localtime
Because for a dual boot machine the BIOS clock should be set to local time, as this is the way Windows works with the hardware clock.
Tell if the command gives you an error message.
Thank you for taking the time to assist me on this.

I looked for the file manually named /etc/adjtime but I didn't see it. I even did a search on it starting from / and still didn't see it.

I did run the command echo "0.0 0 0.0" > /etc/adjtime (& then) /sbin/hwclock --hctosys --localtime It did not return any errors but the time never changed. (All under root)

Last night I ran this command and it didn't resolve the issue either. hwclock --set --date "09 Apr 2006 23:29"

I am tempted to back every thing up and re-install once again but I am trying to avoid that.
 
Old 04-10-2006, 11:02 AM   #12
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 530

Rep: Reputation: 50
I'm out of ideas now.
What puzzles me is that it worked before "Time Change". So it cannot be config options of the kernel.
Check if /dev/rtc still exists, you should find:
crw------- 1 root root 10, 135 2004-04-06 15:27 /dev/rtc
and for the config options of the kernel:
CONFIG_HPET_EMULATE_RTC=y
CONFIG_RTC=y
Check in /var/log/boot.msg and /var/log/messages if messages related to the clock appear, and with dmesg also.
 
Old 04-10-2006, 12:45 PM   #13
ltcolfury
LQ Newbie
 
Registered: Nov 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by berbae
I'm out of ideas now.
What puzzles me is that it worked before "Time Change". So it cannot be config options of the kernel.
Check if /dev/rtc still exists, you should find:
crw------- 1 root root 10, 135 2004-04-06 15:27 /dev/rtc
and for the config options of the kernel:
CONFIG_HPET_EMULATE_RTC=y
CONFIG_RTC=y
Check in /var/log/boot.msg and /var/log/messages if messages related to the clock appear, and with dmesg also.
I'm not sure how this happened but I believe it is fixed. (Before I read your latest response.) I booted into Windows and the time was off by an hour. I went into the properties and reset it to Internet time. (Just clicked update again) I booted back into Linux (Where I am at 95% of the time)and the time was correct. This whole situation has me puzzled. But on a good side it looks as if it is corrected. I have no idea why Windows would have the wrong time out of nowhere.

Thank you wholeheartedly for your assistance.
 
Old 07-09-2006, 08:51 AM   #14
curcur
LQ Newbie
 
Registered: Jul 2004
Location: bolio
Distribution: SUSE10.0
Posts: 1

Rep: Reputation: 0
I have the same problem with Itcolfury at suse10.0, the clock is just like return to the last time it turning off.

And then I tried to check the service when it shutting down and at start up,
there are a service that take the last CMOS clock and save it and then put back at the start time.

does anyone knows how to stop that service?
 
Old 07-17-2006, 12:50 PM   #15
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 46
Quote:
Originally Posted by curcur
I have the same problem with Itcolfury at suse10.0, the clock is just like return to the last time it turning off.

And then I tried to check the service when it shutting down and at start up,
there are a service that take the last CMOS clock and save it and then put back at the start time.

does anyone knows how to stop that service?
As root, you can go to /etc/init.d and rename the service hwclock.sh to hwclock.sh.DISABLED or whatever you want to, and it will cause the service not to run. I'm not clear on why you want to do that, but it shouldn't hurt anything to try it.

My hardware clock appears to lose between 5 and 7 HOURS every night, by the way! I haven't found a way to fix that other than to set the time every day when I turn the computer back on. (I normally turn it off every night.) I say "appears" to lose, because probably it's a software problem I just haven't figured out yet.

By the way, the manual page for hwclock is interesting and details several options you can use to check the two clocks and to reset either or both.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 09:58 PM
Incorrect time on the board? LordFett LQ Suggestions & Feedback 2 10-17-2005 02:01 PM
[SOLVED] Time shown incorrect? druuna LQ Suggestions & Feedback 8 03-30-2005 03:15 PM
Incorrect time Delphinusnz Mandriva 2 10-12-2004 02:22 AM
Time and Date incorrect wfischer Linux - Software 2 07-07-2004 01:45 PM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration