System time synchronization and time zone modification and setting in CentOS

Source: Internet
Author: User
Tags vps
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.