time modified when booting
I installed the RH9 a few month ago, on my K6-2 500Mhz, and on my i5150 dell laptop. I have a multiboot on both, with windows installed on other partitions. And I have the same following problem : everytime I boot, the time is modified, it is a 2 hours.
For instance, let's say it 7 am. If I boot twice without correcting the time, it will be then nearly 11 am.
Does anyone know the origin of this problem, and how I can resolve it ?
You could try replacing the motherboard cmos battery.
My laptop is rather new (it is a dell i5150 laptop I bought 8 months ago). Are sure it would solve the problem ?
I know nothing about RH9 so i can't help with particulars
Posix traditionally uses UTC (Universal Time Coordinated) time ie. Greenwich Mean Time
Winblows on the other hand uses local time format.
Linux can use either so when you dual boot with windows you need to use local time
on your Linux system
check out a file /etc/sysconfig/clock
your ZONE (timezone) there should be correct and you should have
ok there is another file /etc/localtime that has to be correct
you have a program there on redhat (i hope) called "tzselect"
run that and follow along
when you are done write the last line on a text editor
it's you timezone i will call it variable $TIMEZONE
when i put $TIMEZONE you put the timezone you got fron tzselect
now (as root )
cp --remove-destination /usr/share/zoneinfo/$TIMEZONE /etc/localtime
OK now the last thing (this doesn't really sound like your problem though)
when your system boots up it reads the time from the BIOS hardware clock
if your time is still comming up all screwy after the changes above
then your hardware clock isn't keeping good time (alot of hardware clocks don't)
possible battery issue i don't use laptops so i don't know about that
so one sort of ok solution is to write the correct time out to the BIOS durring shutdown
that way at least it gets set periodically
(it is possible RH is doing this already i don't know)
read your bootscript /etc/rc.d/init.d/setclock or something to that effect and see
to write localtime to your hardware clock
and you can run this as root anytime
hwclock --systohc --localtime
look for that in the stop section of the script
if it's not there put it in in the proper plae or just before you shutdown run the command
you can put an alias in your root .bashrc like
alias set_hwclock='hwclock --systohc --localtime'
or something like that
here is another fun command for your root .bashrc if your system has ntpdate
alias set_sysclock='/usr/sbin/ntpdate 22.214.171.124'
I tried your advice and the problem seems to be fixed.
Then I used tzselect, and had finally TIMEZONE=Europe/Paris.
Finally, I reboot under my RH9, and time was ok.
I also rebooted under windows, then rebooting back to RH9. And clock didn't change.
I don't really understand which things I did modify during this procedure, but it seems to be solved.
Well many thanks.
PS : I doubted my CMOS battery was failing, be cause booting under windows, the clock never changed. However thanks to you all.
|All times are GMT -5. The time now is 11:58 PM.|