[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