Linux modifies server system time

Source: Internet
Author: User
Tags local time

Objective


To modify the unified system time as required by the project requirements the details are configured as follows:



In CentOS 7 there is a command timedatectl can help us to modify the time zone of the server.

1. Check the time settings in the server Timedatectl, which is equivalent to the TIMEDATECTL status:

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9B/A2/wKiom1llirHznWF5AAAV0KKjnVY239.png "title=" 1.png "alt=" Wkiom1llirhznwf5aaav0kkjnvy239.png "/>

2. Understand the various parameters of the TIMEDATECTL command:

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9B/A2/wKioL1lliyzA0O23AAAzjb3fEOk839.png "title=" 2.png "alt=" Wkiol1lliyza0o23aaazjb3feok839.png "/>

3. Set the time

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9B/A3/wKiom1lliz6ieulTAAAZbXeFSb8548.png "title=" 3.png "alt=" Wkiom1lliz6ieultaaazbxefsb8548.png "/>

Let's take a look at CentOS modifying server system time

After the installation of Linux, it is generally a foreign world, it is not convenient to set up tasks, or cause the site to get local time confusion, so you need to change the server time and local time consistent, that is, the time to change to China.


First instruction: Date–s ' 2017-07-12 10:22:30 '

Second instruction: Clock–w//write date to CMOS


Time in accordance with the above format, the operation is finished can be used again

Date



Check the server time, if it is the same as set, it will be successful.

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/9B/A2/wKioL1lli4eh5GqlAAAWSLqei44419.png "title=" 4.png "alt=" Wkiol1lli4eh5gqlaaawslqei44419.png "/>


The above is my introduction to the CentOS7 to modify the server system time method, I hope we have some help, if you have any questions please give me a message, small series will promptly reply to you. Thank you very much for your support of the 51cto website.


This article from "Li Shilong" blog, declined reprint!

Linux modifies server system time

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.