There are several ways of update date and time in linux , among which the simplest are:
Easier however, there is the need to have internet connection, and ntpdate installed.
If you do not have ntpdate installed you can install from source: http://www.ntp.org/downloads.html , or whether you have the aptitude:
aptitude install ntpdate
You can find a list of servers ntp's the link: http://support.ntp.org/bin/view/Servers/NTPPoolServers
also can use the ip national observatory :
We can also put the script in cron to be checked hourly.
and put the code:
00 **** ntpdate-u pool.ntp.org
For the date command
This update can separate the date and time
yyyy : the 4-digit year
mm : the 2-digit month
dd : the 2-digit day
date-s 'hh: mm: ss'
hh : time from 00 to 23
mm : the 2-digit minute 00-59
ss : seconds with 2 digits 00-59