I. modify the time zone rm-rf/etc/localtime # delete the current default time zone www. kwx. gdln-s/usr/share/zoneinfo/Asia/Shanghai/etc/localtime # replace the default time zone with Shanghai SSH. run the preceding command to change the VPS time zone to Shanghai, China, of course, you can also set the time for Hong Kong or Beijing. II. manual correction time I. Correction time zone
Rm-rf/etc/localtime # delete the current default time zone www. kwx. gdln-s/usr/share/zoneinfo/Asia/Shanghai/etc/localtime # replace the default time zone with Shanghai
Run the above Command in SSH to change the VPS time zone to the time zone in Shanghai, China. of course, you can also set the time in Hong Kong or Beijing.
II. manual correction time
date -s '09:16:00 2013-01-21'
Use the "date" command to modify the date and date to January 21, 2013 at 09:16:00 A.M.
III. automatic time synchronization and correction
Yum install-y ntp # install the time synchronization service (component) ntpdate us.pool.ntp.org # set the date of the synchronization server # view the current time www. kwx. gd
Some systems have already installed the NTP service, and the system will automatically connect to the ntp server to correct the time according to the currently recorded time zone (step 1.