Home   Profile   Fun
#131 Linux  03.06.2007

rdate is a simple way to synchronize a hosts system time


An alternative to the NTP daemon is rdate. rdate connects to a time server and sets the system time. The setup and use is extremely easy. Only one line in /etc/crontab is needed. On a Gentoo system just do the following steps:

Enter the BIOS and set the hardware clock to UTC.

Open a shell and select your timezone
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime

Install rdate
emerge -va rdate

Run rdate manually once
/usr/bin/rdate -s time.fu-berlin.de > /dev/null

Verify the correct time
date

Make a cron entry so that rdate runs every night at 1:03 for example. The time server should be as close as possible to the location of the host.
03 01 * * * root /usr/bin/rdate -s time.fu-berlin.de > /dev/null