The rsync program relies upon accurate clocks on the various machines that it is synchronising between because it uses the modification timestamps to determine which is newer and therefore which was more recently altered. So as the first stage in getting a distributed and bi-directional rsync system up and running so as to synchronise my files between several workstations and a fileserver, I have had to install and setup some tools that correct the clocks on each of these machines.
The default is to use ntpdate which is installed on many *nixes by default but is only set to update the system clock at startup. Therefore a cron job is required to be run to cause ntpdate to be automatically run more often. Create an executable (chmod 755) /etc/cron.daily/ntpdate file containing:
ntpdate ntp.ubuntu.com pool.ntp.org
Because a machine's hardware clock can drift over time it helps also to install the ntp daemon which calculates the drift in your system clock and adjust is. To set it up, all that is required is:
sudo apt-get install ntp
followed by adding the ntp server pool to /etc/ntp.conf:
server ntp.ubuntu.com
server pool.ntp.org
This process needs to be followed on all machines that are going to be part of the synchronisation pool because they all need to have accurate clocks.