LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   time wrong after boot failure (https://www.linuxquestions.org/questions/linux-newbie-8/time-wrong-after-boot-failure-419009/)

baddah 02-24-2006 03:41 AM

time wrong after power failure
 
Hi

I have the following problem,After a power failure my machines time is off by 2 hours.I am not using UTC so according to me it should not adjust time according to daylight savings,etc.What could cause this,I am sure the time is correct before the power failure.Thanks for any help...

satinet 02-24-2006 03:43 AM

which ditro are you using? mepis?

you can use the 'ntpdate' command to update the time to an appropriate time server. also check you regional settings...

baddah 02-24-2006 03:50 AM

I'm using FC3 kernel 2.6.12-1.1381_FC3 on that machine.I am updating time through ntpdate at 2:30 am through a cron job,but if the power fails before that the time will be wrong until then.It only happens on the one machine,the other machines time is still correct after power failure.My timezone is southfrica/Johannesburg so why will it change after the power failure?

satinet 02-24-2006 03:59 AM

it sounds like your CMOS battery has failed - your time is being forgetting by the hardware when you power off.

it looks like a large watch battery. try making some change to your bios and see if it's remembered.

baddah 02-24-2006 04:50 AM

Its a remote machine,so I'll check the battery later,but i'm pretty sure that's not the problem,because the machine is still pretty new,so thae battery should be fine.but thanks for your help.

satinet 02-24-2006 05:01 AM

so it keeps reseting to UTC?

baddah 02-24-2006 05:09 AM

It seems so yes,is there anything else that would cause the time to be set back by 2 hours?except a faulty battery.As i said i'm not using UTC,but still it seems to reset to it.very weird...

corbintechboy 02-24-2006 05:11 AM

Could be updating with a time server over the net and have the wrong zone maybe?

satinet 02-24-2006 05:11 AM

yeah, it's not battery.

i don't know fedora and it's regional settings. but that seems to be the problem.

is there an /etc/timezone

???

satinet 02-24-2006 05:13 AM

anti - not if you have your time zone set correctly - it should adjust your time accordingly. try changing your timezone and doing an ntpdate.....

baddah 02-24-2006 05:20 AM

There's no /etc/timezone but there's a /etc/sysconfig/clock where you can change the timezone ,mine="Africa/Johannesburg", which is right,the UTC,mine is set to false,and ARC ,which i'm not to sure what it does but mine is false.

I am not updating time to any ntp server other than the ntpdate i run through a cron,so that shoul not be the problem as well...

satinet 02-24-2006 05:22 AM

Quote:

There's no /etc/timezone but there's a /etc/sysconfig/clock
cool. i've never used fedora so i dont know.

i thiunk that problem must lie in this area.

i live in UTC land though... :-D

baddah 02-28-2006 02:57 AM

Hallo again.I've "fixed" it by just running a ntpdate command when the system boots up again after a power failure,but in the background the time is still getting set back by two hours for some reason,i'm just setting it right again every time,so if someone knows what it might be please let me know,but i guess its fine as it is now...

Dtsazza 02-28-2006 07:33 AM

Sounds a bit unlikely, but is the machine dual-boot by any chance? Windows handles daylight-savings differently to Linux, with the result that my Linux(/system) clock was put back (or forward, I forget which) an hour when I booted into Windows. The 'solution' was to disable Windows' "Automatically update the clock for daylight savings" thing, which I still think does it the wrong way. It did mean the time was an hour out in Windows though, which may or may not be appropriate for you (if it's even relevant).


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