Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System clock? [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Morimando
Guru
Guru


Joined: 14 Feb 2005
Posts: 339
Location: Germany

PostPosted: Sun Feb 27, 2005 1:33 pm    Post subject: System clock? [solved] Reply with quote

Hm it's not a majoy issue that i'm bothering you with, it's just the following:
My system clock is about 5 minutes after "real time", so i set it to the right time by running (as root)
Code:

netdate -v time.fu-berlin.de

Everything working correctly until this point, but when i restart, the clock is set back to the wrong time. So my question is: how do i get Gentoo to save the time to the onboard-clock? It's just enerving setting the correct date/time after every restart..
thanks folks ;)
_________________
That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin


Last edited by Morimando on Sun Feb 27, 2005 4:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
frary
Guru
Guru


Joined: 27 Jan 2004
Posts: 545

PostPosted: Sun Feb 27, 2005 1:53 pm    Post subject: Reply with quote

Have a look at ntp...sets the time by typing
Code:
ntpdate pool.ntp.org

or you can let it check and correct your time at startup ( by adding to default runlevel ).

Works quite nice here...

T
_________________
Mitleid bekommt man geschenkt;
Neid muss man sich hart erarbeiten!

I.Walter
Back to top
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Sun Feb 27, 2005 2:03 pm    Post subject: Reply with quote

The "clock" init script should automatically save and restore the system clock to the hardware clock at each shutdown/boot.

Make sure you have /sbin/hwclock (from sys-apps/util-linux) installed and working.
"hwclock --systohc" and "hwclock --hctosys" can be used to do this manually.
_________________
Please put [SOLVED] in your topic if you are a moron.
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Sun Feb 27, 2005 2:25 pm    Post subject: Reply with quote

Also keep an eye on /etc/adjtime and the --noadjfile option of hwclock.
Back to top
View user's profile Send private message
Morimando
Guru
Guru


Joined: 14 Feb 2005
Posts: 339
Location: Germany

PostPosted: Sun Feb 27, 2005 2:54 pm    Post subject: Reply with quote

Am i a dumbass?
"There are no ebuilds that could satisfy hwclock"
_________________
That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Sun Feb 27, 2005 3:35 pm    Post subject: Reply with quote

Morimando wrote:
Am i a dumbass?
"There are no ebuilds that could satisfy hwclock"

Well, hwclock is in the sys-apps/util-linux ebuild. :wink:
I've had similar issues, but I set the time locally, instead of using a server. But anyway, try setting the clock to the correct time like you usually do. Remove the file /etc/adjtime. Then, run
Code:
hwclock --systohc
, which should set the hardware clock to the current system time. When you reboot, hopefully your system time will be correct.

You don't need to have /etc/init.d/clock sync the hardware clock to the system time upon shutdown, only during boot. The /etc/adjtime file is supposed to make adjustments for hardware clock time drift. But if it's misconfigured, it will incorrectly set your system time when gentoo boots.
Back to top
View user's profile Send private message
Morimando
Guru
Guru


Joined: 14 Feb 2005
Posts: 339
Location: Germany

PostPosted: Sun Feb 27, 2005 4:06 pm    Post subject: Reply with quote

thanks that was what i wanted to know :) also thanks to all others :)
_________________
That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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