Linux time modification

Source: Internet
Author: User

 

When you add data to the database today, the displayed time of the inserted data is incorrect.

Linux system time settings, so I checked some relevant information online and sorted it out for the next time.

In Linux, we usually use the "date-s" command to modify the system time.

The command for 2011-7-28 is [root @ test] # date-s 2011/07/28, modifying the Linux system time and

For the local Windows system, run the [root @ test] # date-s command. However

When the Linux system restarts, the system reads the time from CMOS to the system time variable.

In order to maintain the consistency between the system time and the CMOS time

For a period of time, after we execute date-s, if the machine is restarted immediately, the modification time may not be

This is the cause of the problem. To make sure the modification takes effect, run the following command:

[Root @ test] # clock-w, which forces the modified system time to be written into CMOS.

 

This article is from the "vkey24" blog

 

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.