Practical date and time modification method, practical date modification method

Source: Internet
Author: User

Practical date and time modification method, practical date modification method

Date and Time Modification
1. view the time and date

[Root @ qdy ~] # Date Monday, January 1, December 04, 2017 10:02:12 CST

Or

[Root @ qdy ~] # Clock-0.517451 seconds

Show Calendar

[Root @ qdy ~] # Cal October 17, 910 5 6 1 2 3 4 6 7 8 1617 11 12 13 14 15 2324 18 19 20 21 22 3031 25 26 27 28 29

2. Set the time and date
For example, set the system date to November 3, 2017.

[Root @ qdy ~] # Date-s 2017/12/042017-July 22, December 04 00:00:00 CST

Set the system time to 11:45:50.

[Root @ qdy ~] # Date-s 10:12:50 December 04 CST

3. After the system time is set, you also need to synchronize it to the hardware clock and write the current time and date to the BIOS to avoid failure after restart,

[Root @ qdy ~] # Hwclock-w
Or
[Root @ qdy ~] # Clock -- systohc
In the preceding command, -- hctosys indicates Hardware Clock to SYStem clock.

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.