View previous topic :: View next topic |
Author |
Message |
cfvr n00b
Joined: 23 Sep 2004 Posts: 25
|
Posted: Thu Sep 23, 2004 1:14 pm Post subject: Setting system time correctly |
|
|
Hi,
I'm new to Gentoo (and Linux for that matter ) and I have a problem setting the system time correctly. My Clock isn't erratic as I've read lots of times, it runs smoothly, but it's in the wrong timezone and runs exactly 2 hours ahead.
I have made a symlink to my zoneinfo in /etc/:
lrwxrwxrwx 1 root root 36 Sep 23 14:36 localtime -> /usr/share/zoneinfo/Europe/Amsterdam
(I live in amsterdam)
I have changed CLOCK="UTC" in /etc/rc.conf to CLOCK="local"
Then I restarted the clock daemon (etc/init.d/clock)
I installed and configured openntpd and started it to the default runtime using rc-update, I can start and stop /etc/init.d/openntpd succesfully, but when i type 'date' it says 'Thu Sep 23 17:10:19 CEST 2004'
And that's not the correct timezone! The tclock is running 2 hours fast, what can I do to correct this?
I tried Google, Gentoo docs, the forum, I even called grandma no answers |
|
Back to top |
|
|
asph l33t
Joined: 25 Aug 2003 Posts: 741 Location: Barcelona, Spain
|
Posted: Thu Sep 23, 2004 1:53 pm Post subject: |
|
|
emerge rdate && rdate -s time.nist.gov _________________ gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep |
|
Back to top |
|
|
TrueDFX Retired Dev
Joined: 02 Jun 2004 Posts: 1348
|
Posted: Thu Sep 23, 2004 1:56 pm Post subject: |
|
|
Quote: | And that's not the correct timezone! | The timezone isn't your problem. CEST is Central European Summer Time, which is what we use here (I'm in the NL too) half the year. The problem is that your time doesn't get synced with openntpd (by default, anyway). |
|
Back to top |
|
|
cfvr n00b
Joined: 23 Sep 2004 Posts: 25
|
Posted: Thu Sep 23, 2004 2:11 pm Post subject: |
|
|
Ah! i already looked through the man pages of date, but completely missed it ok so the timezone correct, tnxs for the info
I can't seem to get openntpd working, so I'm emerging ntp.. 40Megs, 26 packages!! Isn't that a bit large just for synchronizing the system time? |
|
Back to top |
|
|
TrueDFX Retired Dev
Joined: 02 Jun 2004 Posts: 1348
|
Posted: Thu Sep 23, 2004 2:13 pm Post subject: |
|
|
cfvr wrote: | I can't seem to get openntpd working, so I'm emerging ntp.. 40Megs, 26 packages!! Isn't that a bit large just for synchronizing the system time? |
nastassja wrote: | emerge rdate && rdate -s time.nist.gov |
rdate doesn't need a whole lot. |
|
Back to top |
|
|
cfvr n00b
Joined: 23 Sep 2004 Posts: 25
|
Posted: Thu Sep 23, 2004 2:46 pm Post subject: |
|
|
It looks like you can't daemonize rdate though.. ah well, i can make a cronjob for rdate -s ntp.xs4all.nl
I've got myself a new challenge learning cron
Thanks for the help! |
|
Back to top |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Thu Sep 23, 2004 2:49 pm Post subject: |
|
|
I use getdate instead of rdate:
as root: crontab -e
0 20 * * * getdate -set 10 3800 ntp2.xs4all.nl |
|
Back to top |
|
|
inode77 Veteran
Joined: 20 Jan 2004 Posts: 1303 Location: Heart of Europe
|
Posted: Thu Sep 23, 2004 2:51 pm Post subject: |
|
|
Code: | # DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.32012 installed on Sun Sep 19 16:22:23 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# minute (0-59),
# | hour (0-23),
# | | day of the month (1-31),
# | | | month of the year (1-12),
# | | | | day of the week (0-6 with 0=Sunday).
# | | | | | commands
# | | | | | |
# | | | | | |
0 10 * * * /usr/bin/rdate -s swisstime.ee.ethz.ch &> /dev/null
# | | | | | |
0 20 * * 3 /usr/sbin/eupdatedb &> /dev/null
|
Nothing to learn really just write and you'll be fine. (Oh yeah there's one thing make sure no output to stdout is generated.) |
|
Back to top |
|
|
|