LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   After restart time jumps 7 hours (https://www.linuxquestions.org/questions/linux-general-1/after-restart-time-jumps-7-hours-51114/)

mlbaker 03-21-2003 10:49 PM

After restart time jumps 7 hours
 
I am running Redhat 8.0 fully updated. I am using the newest kernel 2.4.18-27.8.0. Here is my problem. When i restart the box, time jumps back exactly seven hours. For example if the current time was 8:50pm and i restarted the box it would be 1:50pm. Then if i restarted the box again it would be 6:50am. Wild...

Another problem that seems to be directly related is that after a restart my computer my key repeat rate does not work. I can go into a terminal(or any program where i can type) and press and hold a key and it will only print it once. When i go and change the time (usually back to the correct time) the key repeat starts working again.

I don't know if this will help but i do not have clock synchronization turned on, and i have the correct timezone set up.

Thank you for any help on this problem.

Matt Baker.

doublefailure 03-22-2003 12:50 AM

time problem.. i suggest using ntpd
i had simmilar problem with mandy, and ntpd solved it
keyboard thing is.. i suspect you r not loading correct module for your keyboard..
is your keyboard usb?
try uhci, ohci (might not exactly correct spelling)

rnturn 03-22-2003 01:27 AM

Re: After restart time jumps 7 hours
 
Quote:

Originally posted by mlbaker
I am running Redhat 8.0 fully updated. I am using the newest kernel 2.4.18-27.8.0. Here is my problem. When i restart the box, time jumps back exactly seven hours. For example if the current time was 8:50pm and i restarted the box it would be 1:50pm. Then if i restarted the box again it would be 6:50am. Wild...
Are you in the Mountain time zone? Hardware clock set to UTC? Are you dual booting to Windows?

mlbaker 03-22-2003 03:01 AM

Problem is fixed. Thank you both
 
Thank you both for responding. Well the problem seems to have vanished. I think it was a hw and software clock sync problem. I think that Linux thought that the hw clock was in UTC, and then every time it started up it set the software clock to hw-7 hrs. Then when it shut down it set the hw clock to the sw time. This is my guess. :)

All i did was set the system time to the correct time, and set the hw clock to the system time. “/sbin/hwclock –systohw”. This fixed it somehow. I restarted several times and this is my results, so it is working. (before when i would do this both the hw and sw clocks were is MST but 7 hours out of sync)

Would you suggest converting my hw clock to UTC? I think i read that some people want the hw clock in UTC because of daylight savings time, but here in AZ we don't have it. BTW i do not have a dual boot machine. I'm on a laptop where i am using an external screen, ps2 keyboard and usb mouse, most of the time.

Thank you again!
Matt Baker.

---Before restart---
[mlbaker@localhost mlbaker]$ date
Sat Mar 22 01:17:02 MST 2003
[mlbaker@localhost mlbaker]$ /sbin/hwclock
Sat 22 Mar 2003 01:17:05 AM MST -0.451254 seconds
[mlbaker@localhost mlbaker]$

---After first restart---
[mlbaker@localhost mlbaker]$ date
Sat Mar 22 01:22:16 MST 2003
[mlbaker@localhost mlbaker]$ /sbin/hwclock
Sat 22 Mar 2003 01:22:39 AM MST -0.662873 seconds
[mlbaker@localhost mlbaker]$

---After second restart---
[mlbaker@localhost mlbaker]$ date
Sat Mar 22 01:27:32 MST 2003
[mlbaker@localhost mlbaker]$ /sbin/hwclock
Sat 22 Mar 2003 01:27:37 AM MST -0.357682 seconds
[mlbaker@localhost mlbaker]$

---After third restart---
[mlbaker@localhost mlbaker]$ date
Sat Mar 22 01:31:11 MST 2003
[mlbaker@localhost mlbaker]$ /sbin/hwclock
Sat 22 Mar 2003 01:31:18 AM MST -0.518138 seconds
[mlbaker@localhost mlbaker]$

---FYI here is my /etc/sysconfig/clock---
[mlbaker@localhost mlbaker]$ cat /etc/sysconfig/clock
ZONE="America/Phoenix"
UTC=0
ARC=0
[mlbaker@localhost mlbaker]$

rnturn 03-22-2003 11:19 AM

Re: Problem is fixed. Thank you both
 
Quote:

Originally posted by mlbaker
Would you suggest converting my hw clock to UTC? I think i read that some people want the hw clock in UTC because of daylight savings time, but here in AZ we don't have it.
I would set the HW clock to UTC. You can avoid the DST switches by going into ``Ssystem Settings -> Date & Time'' and selecting the correct time zone. There's one called ``Mountain Standard Time -- Arizona'' that I think is the one you want. You can probably still use NTP on the system to correct for the inevitable drift of the HW clock. If you set it up, you'll be able to report back in a few weeks whether it made the DST adjustment on your system or not. :-)
Quote:

BTW i do not have a dual boot machine. I'm on a laptop where i am using an external screen, ps2 keyboard and usb mouse, most of the time.
Good for you! The reason I asked was that I've seen folks get all confused when they booted into Windows, saw that the time was off, corrected it, and then noticed that the time in Linux was then messed up.

Cheers,
Rick


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