View previous topic :: View next topic |
Author |
Message |
vance n00b
Joined: 27 Feb 2006 Posts: 9 Location: San Francisco
|
Posted: Mon Mar 20, 2006 12:22 am Post subject: clock is always wrong by 3 or 4 hours[solved] |
|
|
i have set my clock with 'date -s xx:xx:xx' a thousand times; it only sets until i reboot. i have tried putting both UTC and local into the appropriate space in the etc/conf.d/clock config file. i have tried to have it set properly at shutdown. NO LUCK. it works from ubuntu when i boot from the other partition and in elive. but not when i boot my gentoo. WHY?
anyone have any insights?
Last edited by vance on Mon Mar 20, 2006 8:58 pm; edited 1 time in total |
|
Back to top |
|
|
gentoo_dude l33t
Joined: 08 May 2004 Posts: 645 Location: Washington, DC
|
Posted: Mon Mar 20, 2006 12:25 am Post subject: |
|
|
What is the timezone set to: /etc/localtime |
|
Back to top |
|
|
avieth Veteran
Joined: 17 Sep 2004 Posts: 1945 Location: Canada
|
|
Back to top |
|
|
vance n00b
Joined: 27 Feb 2006 Posts: 9 Location: San Francisco
|
Posted: Mon Mar 20, 2006 8:56 pm Post subject: clock time solved |
|
|
thanks so much. NTP did the trick. seems like a workaround, but a solution is all i wanted. |
|
Back to top |
|
|
simvin76 Tux's lil' helper
Joined: 05 Oct 2005 Posts: 96
|
Posted: Tue Mar 21, 2006 12:43 am Post subject: |
|
|
I am not sure about this, but this is how I think it works. I had the same problem before and this was how I solved it.
In /etc/conf.d/clock:
Code: | # If you want to sync the system clock to the hardware clock during
# shutdown, then say "yes" here.
CLOCK_SYSTOHC="yes" | This is probably set to no. When you boot the init scipts thinks your hardware clock is in UTC and changes the time to your local timezone. If you live 3 or 4 timezones away from UTC, everytime you restart the computer the clock will be moved 3 or 4 hours.
But I think you should still use NTP. Or if you reboot your computer often, use ntp-client. My server loses almost 5 minutes every day, and ntp is essential then.
Take care
/Simon |
|
Back to top |
|
|
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Wed Apr 05, 2006 1:31 pm Post subject: |
|
|
I had to set
CLOCK="UTC"
to
CLOCK="local" _________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting. |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Fri Apr 07, 2006 2:07 pm Post subject: Clock problems... |
|
|
EDIT: This is probably not the right way to place this... I created a new post...
Hi everyone
I'm experiencing clock problems on my laptop (IBM X31 - bought as new a week ago).
In the beginning the clock problems was found to be within every reboot of the computer, but after starting the clock-daemon in every reboot, the problems stopped for rebooting.
Now I can reboot the computer, but If I shut it down and then start it later - it looses time (also negative time).
E.g. I started my computer yesterday - adjusted the time, and shut it down this morning.
Today at 13:30 the computer clock was set to april 6 (yesterday) 20:xx, which was quite some hours before I shut it down.
My /etc/conf.d/clock looks like this:
Code: |
# /etc/conf.d/clock
# 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="local"
# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here.
CLOCK_OPTS=""
# If you want to set the Hardware Clock to the current System Time
# during shutdown, then say "yes" here.
CLOCK_SYSTOHC="yes"
|
and I really don't understand why this happens at all.
I have tried with both the CLOCK_SYSTOHC="yes" and CLOCK_SYSTOHC="no" - so this doesn't seem to help changing.
Thanks in advance.
/ Preben Holm |
|
Back to top |
|
|
gentoo_dude l33t
Joined: 08 May 2004 Posts: 645 Location: Washington, DC
|
Posted: Mon Apr 10, 2006 2:31 pm Post subject: |
|
|
what does /etc/localtime point to? There it should point to your timezone (EST5EDT) for me. |
|
Back to top |
|
|
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Thu Apr 13, 2006 4:37 am Post subject: |
|
|
Lost, I just opened up this post before heading off to bed, so my answer will be short, but there is a setting in the kernel configs having to do with the number of cycles updating the clock.
Read this thread https://forums.gentoo.org/viewtopic-t-327823-highlight-.html
its not exactly your trouble, but has other settings that I needed to fix one similar to yours in the past. hope this helps. the hertz setting and pit may help you out. _________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting. |
|
Back to top |
|
|
|