View previous topic :: View next topic |
Author |
Message |
Dr. Frankenbox Apprentice
Joined: 16 Jul 2005 Posts: 170 Location: Iowa, USA
|
Posted: Sat Jan 13, 2007 9:54 pm Post subject: System clock set incorrectly on shutdown [SOLVED] |
|
|
Every time I shut down my Gentoo system, it sets the system clock to a seemingly random time and date. It used to be off by six hours, which could have been due to issues with UTC vs. local time (I'm at UTC-6), but lately it's been off by days, weeks, or even years. There's no discernable pattern anymore. I've been having this problem, or a variant of it, for years now, but I've never bothered much about it because as long as ntp is working, it doesn't matter. Still, there are times when it is irritating. If my network connection is down, then I have to set the date and time manually, and every time I load Windows (I dual boot) I have to set the time manually because Windows has a stupid rule about not syncing with an ntp server if the date is wrong. Is there anything I can do about this issue, at least to stop Gentoo from setting the system clock on shutdown?
Last edited by Dr. Frankenbox on Mon Jan 29, 2007 2:36 pm; edited 1 time in total |
|
Back to top |
|
|
m_spidey Guru
Joined: 28 Feb 2005 Posts: 312 Location: Planetexpress Ship
|
Posted: Sat Jan 13, 2007 10:07 pm Post subject: |
|
|
Hi There
Can you check your /etc/conf.d/clock ?
Don't know if this section helps you.
# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then
# set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local".
CLOCK="UTC" _________________ Ronald McDonald -> The necessary Evil. |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Sun Jan 14, 2007 1:16 pm Post subject: Re: System clock set incorrectly on shutdown |
|
|
Dr. Frankenbox wrote: | Every time I shut down my Gentoo system, it sets the system clock to a seemingly random time and date. It used to be off by six hours, which could have been due to issues with UTC vs. local time (I'm at UTC-6), but lately it's been off by days, weeks, or even years. There's no discernable pattern anymore. I've been having this problem, or a variant of it, for years now, but I've never bothered much about it because as long as ntp is working, it doesn't matter. Still, there are times when it is irritating. If my network connection is down, then I have to set the date and time manually, and every time I load Windows (I dual boot) I have to set the time manually because Windows has a stupid rule about not syncing with an ntp server if the date is wrong. Is there anything I can do about this issue, at least to stop Gentoo from setting the system clock on shutdown? | You must be running with CLOCK="local" for Windows sake.
Some time ago there was a bug in the ordering of the execution of the initscripts in baselayout (mount time) and the system clock was set as if the hardware clock's time was UTC. This would account for your 6 hours out.
However, you now have much larger skews: you say it's the hardware clock being set to a random time and date. Have you tried checking that the BIOS shows this random time after closing down Gentoo?
It might be that the clock battery is foutu and, after powering off the machine, it loses its time setting (you don't say years in the future or years in the past).
However, to answer your question: settingin /etc/conf.d/clock â it's the default setting â will stop the hardware clock being set on closing down. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
Dr. Frankenbox Apprentice
Joined: 16 Jul 2005 Posts: 170 Location: Iowa, USA
|
Posted: Sat Jan 20, 2007 3:44 pm Post subject: |
|
|
Yeah, I definitely noticed that bug back when it was acting as if I'd set CLOCK="UTC" when I'd set CLOCK="local". This is definitely something else now. I don't think it's the battery since I don't seem to be losing my other settings, but so many things are auto-detected now, it's possible I'm just not noticing it. Thanks for the info on CLOCK_SYSTOHC. Oddly, that seems to be set to "no" right now, so I don't know why my system would be setting the hardware clock. I'll try setting it to "yes" once to see if it sets the correct date and time. |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Sat Jan 20, 2007 4:17 pm Post subject: |
|
|
i think it is time to replace your RTC battery in the mother board.
also u can set clok to local time upon closing or reboot by set in /etc/clock.
ntpd keeps trackof time sync.
in windows also u have time sync in windows XP
if other windows you can use emsa time sync free utility.
i am also dual booting no problem in clock. _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
Dr. Frankenbox Apprentice
Joined: 16 Jul 2005 Posts: 170 Location: Iowa, USA
|
Posted: Mon Jan 29, 2007 2:36 pm Post subject: |
|
|
Well, setting CLOCK_SYSTOHC to "yes" seems to have done the trick. Just FYI, using time sync in Windows doesn't set the system clock. (that or there's a bug in my Gentoo install that sets the clock incorrectly when CLOCK_SYSTOHC=no) |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Mon Feb 05, 2007 6:07 am Post subject: |
|
|
i hope you have installed ntp
and ntpd sets your clock and in turn /etc/conf.d/clock set to yes will keep your time upto the minute _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
Duncan_L n00b
Joined: 06 Sep 2008 Posts: 42
|
Posted: Tue Jan 20, 2009 3:38 pm Post subject: Clock Network Daemon |
|
|
Hey all a while ago I vaguely remember hearing about a Daemon that activates as an init script which regulates the time according to a time server or something.
Does this ring a bell for anybody and if so do you know how I can install it?
thanks |
|
Back to top |
|
|
honp Guru
Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Tue Jan 20, 2009 4:34 pm Post subject: |
|
|
Hi, i think that you want ntp (client probably).
H. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Tue Jan 20, 2009 5:23 pm Post subject: |
|
|
merged above two posts here. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
|