1. date command under linux show system time;
2. clock command show hardware clock time. ( same as hwclock cmd)
3. System and clock time can be differernt
4. Whenever a cold reboot happens, system time will be reset to hardware clock
5. if you are using ntp or other equivalents align your time with time server, be aware these tools can
only make sure your system time is aligned.
6. You can manually sycn system time with ntp server by using:
sudo ntpdate ntp0.oucs.ox.ac.uk ntp1.oucs.ox.ac.uk
7. You might therefore want to use a cron job to synchronize your system time with hw clock
e.g. add in /etc/crontab the following line:
# sync hardware clock
0 2 * * * root /sbin/hwclock --systohc >> /var/log/messagesMore information:
http://www.linuxweblog.com/node/199
Labels: clock, date, ntp