The date command is a common command for viewing datetime, and date MMDDHHMMYY.SS (the Order of modification) is used to change the time
Linux time is divided into system time and hardware time,
[[email protected] doc]# clock------------------------------------hardware time
April 18, 2016 Monday 10:07 10 sec -0.236080 seconds
[[Email protected] doc]# Date-------------------------------------system time
Monday, April 18, 2016 10:07:14 EDT
[Email protected] doc]#
Man date you'll find out about his commands, where format is the display format
Cases:
[[Email protected] doc]# date +%y2016[[email protected] doc]# date +%m04[[email protected] doc]# date +%m10[[email protect Ed] doc]# Date +%D04/18/16
In addition Hwclock can also be used to display time hwclock-r; hwclock-s;hwclock-w
System time is not equal to hardware time: Use the Hwclock command to modify: Hwclock-w Synchronize system time to hardware
Hwclock-s synchronizing hardware time to the system
Summary of the date command