Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting system time correctly
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
cfvr
n00b
n00b


Joined: 23 Sep 2004
Posts: 25

PostPosted: Thu Sep 23, 2004 1:14 pm    Post subject: Setting system time correctly Reply with quote

Hi,

I'm new to Gentoo (and Linux for that matter :P ) 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
View user's profile Send private message
asph
l33t
l33t


Joined: 25 Aug 2003
Posts: 741
Location: Barcelona, Spain

PostPosted: Thu Sep 23, 2004 1:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Sep 23, 2004 1:56 pm    Post subject: Reply with quote

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


Joined: 23 Sep 2004
Posts: 25

PostPosted: Thu Sep 23, 2004 2:11 pm    Post subject: Reply with quote

Ah! i already looked through the man pages of date, but completely missed it :P 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
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Sep 23, 2004 2:13 pm    Post subject: Reply with quote

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


Joined: 23 Sep 2004
Posts: 25

PostPosted: Thu Sep 23, 2004 2:46 pm    Post subject: Reply with quote

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 :P

Thanks for the help!
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Sep 23, 2004 2:49 pm    Post subject: Reply with quote

I use getdate instead of rdate:
as root: crontab -e
0 20 * * * getdate -set 10 3800 ntp2.xs4all.nl
Back to top
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Thu Sep 23, 2004 2:51 pm    Post subject: Reply with quote

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
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