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

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

* 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

use rdate take 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 .

©2019-2020 Toolsou All rights reserved,
( Super detail )Eclipse Using tutorials —— use Eclipse Create first HelloWorld! Database operation 5 code implementation mysql Addition, deletion, modification and query of database What can MCU do , Do you have any interesting works made by MCU or open source hardware Go to the interview after reading this , Steady over ~~ Single linked list of primary data structure (C Language implementation )SQL Comprehensive questions Employee unit comprehensive questions Python Implementation of Hanoi Tower code VHDL——JK trigger It's over , Starting salary 30k