Linux One of them ntp The package can automatically calibrate the time , And it's very easy to use .

Debian System installation NTP Timing pack :
1    apt-get install ntpdate

CentOS System installation NTP Timing pack :
1    yum install ntp

Timing command :
1    ntpdate cn.pool.ntp.org

If you want to automatically adjust the time every certain time , Just add the above command to the Cron That's it :
1    00 12 * * * /sbin/ntpdate cn.pool.ntp.org

* cn.pool.ntp.org yes ntp Chinese time service source of network time service organization

Method 2

Quick proofreading linux Server time to Beijing time

The server adopts ntp Update time , Often involved UTC Whether to open or not , When it's turned on, the time will be fast 8 Hours
Some time ago, my friend gave me the following order , One command solves all previous problems .

    rdate -t 60 -s stdtime.gov.hk

use rdate take stdtime.gov.hk Server time grab back , Then write to the hardware

    hwclock -w

Here is rdate How to use the command of

    Function description : Displays the date and time of other hosts .
    language    method :rdate [-ps][ Host name or IP address ...]
    Supplementary notes : implement rdate instructions , Ask other hosts for the system time and display it .
    ginseng    number :
      -p   Displays the date and time of the remote host .
      -s   Send the date and time received from the remote host , System time saved back to local host .

Technology
©2019-2020 Toolsou All rights reserved,
Dijkstra Algorithmic Python realization - Shortest path problem Forbes China Auto rich list : He xiaopengdi 11 Li Xiangdi 14 Li Bindi 15org.postgresql.util.PSQLException Processing records JAVA Convert a string to a numeric type vue obtain el-select Of the selected item label value Output string at specified position --PTAMap---Java judge Map Contains a keyLinux File name validity detection elementui select obtain value( Essence )2020 year 7 month 30 day Wechat applet Use of modules