LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Clock 4 hrs off at start up (https://www.linuxquestions.org/questions/linux-general-1/clock-4-hrs-off-at-start-up-4115/)

mike L 07-10-2001 06:49 AM

Clock 4 hrs off at start up
 
I need a little help, I'm running Mandrake 8.0 and ever since I installed drivers for my soundcard when ever I start the computer in Linux or Windows my clock is exactly 4 hrs slow. I've checked my time zones in both OS's and there o.k. any ideas would be greatfull.

cinnix 07-10-2001 07:11 AM

Check the BIOS time.

jharris 07-10-2001 07:35 AM

a related comment
 
Just thought I'd mention (cos it catches loads people out) that if you use the date command to set your date/time that this only affects the software clock. If you were to reboot then you'd be back where you where before using date. After using date you need to use the hwclock command with some flag (check 'man hwclock' and 'man date' for all the flags/switches) [that I can't remember at the moment] to save the setting to the hardware clock on the system. The hardware clock is normally only referenced at boot time, then a software clock takes over, hence they can be two completely different times!

cheers

Jamie...

mike L 07-10-2001 06:34 PM

cinnix, yea the BIOS clock was off by 4 hrs (ahead) and when I boot into Linux the clock is 4 hrs behind. I think I need to pick up a battery.

jharris, I messed around with hwclock but could not set time (still a newbie at typing commands) I would type "hwclock -s" but nothing happened ?

rshaw 07-10-2001 06:50 PM

sounds like linux is expecting gmt from the bios instead of local time. if you set the bios clock to correct local time is linux 8 hours behind?

DavidPhillips 07-10-2001 07:00 PM

There is the option to set linux to look for the bios hwclock to use GMT so if this is true and you have your local time in the OS then it sounds like you are off by your local time difference from GMT. If you selected GMT - 8 hours then if your bios time is set to local time you will be off by 8 hours.

In my Unix system this is in a file called time.

If you are dual booting with windows and you want local time you need to have Linux look for the bios to have local time. I don't know where it is at, but someone here should have the info to do that. Or you may try to search the internet for it.



:Pengy:

mcleodnine 07-11-2001 02:47 AM

And when you get the GMT/Local thing figured out you can go out and get netdate. Then do a
Code:

netdate timelord.uregina.ca
to set you clock to proper time. Then when you get the correct time try
Code:

hwclock -w
to set your hardware clock.

mike L 07-11-2001 06:26 AM

update, today must be my lucky day when I fired up Windows it started with the correct time. rebooted into Linux and it was off by 4hrs (slow), messed around with 'hwclock' and the time is correct so far, after rebooting twice just to make sure. I think I'm going to keep a eye on this and if it messes up again i'll toss in a new battery. Thanks for everybodies help. I'll be back with more questions as I learn this new OS.

mike L 07-15-2001 08:20 PM

Well It's me again, here's the lowdown so far on this time problem, the culprit is KDE, if I log in to Gnome the time is O.K.,If I reboot into windows it set the BIOS clock 4 hrs ahead. I've tried using the 'hwclock'command but no luck is there a directory I can edit to straighten this out? any help greatly appriciated. Thanks in advance again.

rshaw 07-15-2001 08:25 PM

there's a date and time config window in the kde 'control center' under the system tab it also allows you to set the time zone.

mike L 07-15-2001 08:38 PM

rshaw thats been done and it works until I restart my computer,as long as I stay in linux it will work. There has to be a file some where I can edit because I can go from KDE(with the time off 4hrs) to Gnome and the time will be right on.

rshaw 07-15-2001 08:52 PM

i think it's a bug in 'kclockapplet'. there are many bug reports on this at kde.org. have you ran mandrake update to see if the is a bug fix package available?

mcleodnine 07-15-2001 09:03 PM

Not too sure 'bout the other distros, but in SuSE I can change how the clock is configured. I'm guessing that your BIOS clock will be on local time since you'll be using Winders.
Code:

grep "GMT" /etc/rc.config
# Set to "-u" if your system clock is set to GMT, otherwise "".
GMT="-u"

I'm guessing that it's the combination of the above and your timezone settings.
Code:

grep "TIME" /etc/rc.config
RC_LC_TIME=""
TIMEZONE="Canada/Pacific"
CATMAN_ATIME="7"


mike L 07-16-2001 07:17 AM

rshaw, I can't find Mandrake updates, I know in 7.2 it was on my desktop the only close to it is software manager.

mcleodnine,opened up a terminal but I have no /etc/rc.config


All times are GMT -5. The time now is 02:41 AM.