There is a NTP pack in Linux that can automatically calibrate time and is very useful.
The Debian system installs the NTP school pack:
1 Apt-get Install Ntpdate
CentOS System Install NTP time pack:
1 Yum Install NTP
School Time Order:
1 Ntpdate cn.pool.ntp.org
If you want to automatically go to school at a certain time, just add the above command to cron:
1 * * * */sbin/ntpdate cn.pool.ntp.org
* Cn.pool.ntp.org is the Chinese timing source of NTP network timing organization
Method Two
Fast Proofing Linux server time to Beijing time
Server with NTP update time, often involved in the issue of whether UTC is open, open time will be faster 8 hours
The next time the friend gave me the following command, A command to solve all previous problems.
rdate-t 60-s stdtime.gov.hk
uses rdate to crawl back the STDTIME.GOV.HK server's time and then write to hardware
hwclock-w
The following is a rdate command using the method introduction
Feature Description: Displays the date and time of another host.
Syntax: rdate [-ps][host name or IP address ...]
Supplemental Note: Execute the rdate instruction, ask the other host for system time and display it.
Parameters:
-P Displays the date and time of the remote host. &NBSP
-S Returns the date and time received from the remote host to the system time of the local host.