Linux modifies system time

Source: Internet
Author: User

[Email protected] ~]# date-s 11:29:6
Thu FEB 5 11:29:06 PST 2015
[[Email protected] ~]# Date
Thu FEB 5 11:29:08 PST 2015

[Email protected] ~]# date-s 02/06/2015
Fri FEB 6 00:00:00 PST 2015

[[email protected] ~]# date-s "2015-02-06 11:37:25"
Fri FEB 6 11:37:25 PST 2015
[[Email protected] ~]# Date
Fri FEB 6 11:37:26 PST 2015

This is the system time, Linux is maintained by the operating system.
When the system starts, the Linux operating system reads the time from the CMOS into the system time variable, and the later modification time is realized by modifying the system time. To keep the system time consistent with the CMOS time, Linux writes the system time to CMOS at every time. Since this synchronization takes place at intervals (about 11 minutes), if the machine is re-started immediately after we execute the DATE-S, the modification time may not be written to the CMOS, which is the cause of the problem. You can execute the following command if you want to make sure that the changes take effect.
----#clock-W
----This command forces the system time to be written to the CMOS

Linux modifies 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.