Network Time Protocol is used to keep your time synchronized with a network time server.
More on this in the Gentoo wiki.
Install:
emerge ntp
Setup data is found in /etc/ntp.conf.
Edit the file and specify the server:
server 193.5.216.14 # ntp.metas.ch
server 129.132.2.21 # swisstime.ethz.ch
server 131.188.3.220 # ntp0.fau.de
server 192.53.103.103 # ptbtime1.ptb.de
Set the time: ntpdate <serverName>.
The simplest usage is to synchronize once and a while with a time server.
Add the ntpdate command in the root crontab.
For more precise synchronization, use the ntpd daemon
rc-update add ntpd default
If you have one local machine well synchronized, you can use it as a local time server.
Check the accuracy with (you want a low stratum value):
ntpq -c readvar | grep stratum
Start your local time server with:
rc-update add ntp-client default