Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
clock is always wrong by 3 or 4 hours[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
vance
n00b
n00b


Joined: 27 Feb 2006
Posts: 9
Location: San Francisco

PostPosted: Mon Mar 20, 2006 12:22 am    Post subject: clock is always wrong by 3 or 4 hours[solved] Reply with quote

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
View user's profile Send private message
gentoo_dude
l33t
l33t


Joined: 08 May 2004
Posts: 645
Location: Washington, DC

PostPosted: Mon Mar 20, 2006 12:25 am    Post subject: Reply with quote

What is the timezone set to: /etc/localtime
Back to top
View user's profile Send private message
avieth
Veteran
Veteran


Joined: 17 Sep 2004
Posts: 1945
Location: Canada

PostPosted: Mon Mar 20, 2006 3:56 am    Post subject: Reply with quote

http://gentoo-wiki.com/HOWTO_NTP
Back to top
View user's profile Send private message
vance
n00b
n00b


Joined: 27 Feb 2006
Posts: 9
Location: San Francisco

PostPosted: Mon Mar 20, 2006 8:56 pm    Post subject: clock time solved Reply with quote

thanks so much. NTP did the trick. seems like a workaround, but a solution is all i wanted.
Back to top
View user's profile Send private message
simvin76
Tux's lil' helper
Tux's lil' helper


Joined: 05 Oct 2005
Posts: 96

PostPosted: Tue Mar 21, 2006 12:43 am    Post subject: Reply with quote

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
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Wed Apr 05, 2006 1:31 pm    Post subject: Reply with quote

I had to set

CLOCK="UTC"

to

CLOCK="local"
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
LostInGentoo
Apprentice
Apprentice


Joined: 27 Jun 2002
Posts: 269
Location: Denmark

PostPosted: Fri Apr 07, 2006 2:07 pm    Post subject: Clock problems... Reply with quote

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
View user's profile Send private message
gentoo_dude
l33t
l33t


Joined: 08 May 2004
Posts: 645
Location: Washington, DC

PostPosted: Mon Apr 10, 2006 2:31 pm    Post subject: Reply with quote

what does /etc/localtime point to? There it should point to your timezone (EST5EDT) for me.
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Thu Apr 13, 2006 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum