View previous topic :: View next topic |
Author |
Message |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Fri Sep 10, 2004 4:45 pm Post subject: [SOLVED] system clock has its own will |
|
|
hello,
my system clock just doens't want to display the right time. whenever i adjust it, the next day it's earlier (or sometimes) later on my computer than in real life. i'm getiing a bit tired of this.
what can i do?
greetz,
wimbo
Last edited by wimbo on Tue Sep 14, 2004 3:46 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54845 Location: 56N 3W
|
Posted: Fri Sep 10, 2004 4:58 pm Post subject: |
|
|
wimbo,
Do you dual boot with Windows? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Fri Sep 10, 2004 5:07 pm Post subject: |
|
|
no. i work only with gentoo. always booting the same kernel (2.6.
greetz,
wimbo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
drescherjm Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Fri Sep 10, 2004 5:10 pm Post subject: |
|
|
I have the same problem on all my gentoo boxes. If I don't sync with a time server my clock drifts like 30 minutes (behind) in three days. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
weltraumfahrer Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/2749417723f451b086e4a8.gif)
Joined: 17 Dec 2002 Posts: 195 Location: Karlsruhe, Germany
|
Posted: Fri Sep 10, 2004 5:25 pm Post subject: |
|
|
Hi,
Code: |
rm /etc/adjtime
/etc/init.d/clock stop
/etc/init.d/clock start
|
should fix it.
Frank |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fls Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Apr 2003 Posts: 111 Location: Germany
|
Posted: Fri Sep 10, 2004 5:30 pm Post subject: |
|
|
can you please post the output of
Code: | ls -l /etc/localtime
grep CLOCK /etc/rc.conf |
Thanks ![Smile :)](images/smiles/icon_smile.gif) _________________ First they ignore you, then they laugh at you, then they fight you, then you win. Mahatma Ghandi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54845 Location: 56N 3W
|
Posted: Fri Sep 10, 2004 5:37 pm Post subject: |
|
|
wimbo,
The PC contains two clocks. The BIOS clock, which actually has a pretty good crystal, so it keeps good time. This maintains the time while the PC is off.
When the PC is on, the OS reads the time from this source, then uses the much poorer CPU clock to keep time. Its an interrupt dtiven service and its possible to lose interrupss, which equates to lost time ticks. That doesnt account for your clock being fast ever.
Linux, thinks it knows the time better then the BIOS, and it sets the BIOS clock to system time as it shuts down. This makes the BIOS time wrong. The fix as others have said, is to run ntp as a cron job to sync your time with a time server. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
drescherjm Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Fri Sep 10, 2004 7:54 pm Post subject: |
|
|
I thought that was the problem as I actually worked on this very problem about 10 years ago on a different unix based os.
Quote: | That doesnt account for your clock being fast ever. |
If the crystal is running the clock at a frequency that is too fast you can gain time but it is more likely that you will loose. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Fri Sep 10, 2004 9:25 pm Post subject: |
|
|
fls wrote: | can you please post the output of
Code: | ls -l /etc/localtime
grep CLOCK /etc/rc.conf | |
Code: | ls -l /etc/localtime
ls: /etc/localtime: No such file or directory
grep CLOCK /etc/rc.conf
# 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
CLOCK="UTC" |
i find it very strange that my clock is set to UTC again, although i set it to CEST (western Europe > Brussels) during installation
greetz,
wimbo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Fri Sep 10, 2004 9:28 pm Post subject: |
|
|
[quote="weltraumfahrer"]Hi,
Code: |
rm /etc/adjtime
/etc/init.d/clock stop
/etc/init.d/clock start
|
should fix it.
that didn't really help. nothing changes. it justs stops and starts again.
greetz,
wimbo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Fri Sep 10, 2004 9:31 pm Post subject: |
|
|
NeddySeagoon wrote: |
Linux, thinks it knows the time better then the BIOS, and it sets the BIOS clock to system time as it shuts down. This makes the BIOS time wrong. The fix as others have said, is to run ntp as a cron job to sync your time with a time server. |
i find this very strange. i used redhat, mandrake and suse before and never had the problem. how come?
and more important: i don't really now how to set an ntp as a crn job. i suppose i can google for a belgian ntp server but what then?
greetz,
wimbo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tarkus n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 08 Jul 2004 Posts: 27
|
Posted: Fri Sep 10, 2004 10:54 pm Post subject: |
|
|
emerge ntp && rc-update add ntpd default && rc-update add ntp-client default
I think there's a /etc/conf.d entry too... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Tue Sep 14, 2004 3:01 pm Post subject: |
|
|
seems still to be a problem. seems that ntpd is running, but it's adjusting my clock to UTC instead of CEST.
greetz,
wimbo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wimbo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/208517254145869ec9d2211.jpg)
Joined: 19 Aug 2004 Posts: 110 Location: Ninove - Belgium
|
Posted: Tue Sep 14, 2004 3:45 pm Post subject: |
|
|
i solved it! i made a symlink in /etc/localtime to my timezone. (thought i did it that while installing, but may be i forgot)
thx all
wimbo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|