Baidu a bit of date usage, summarized as follows:
direct display [[email protected] ~]# Date
Thu Oct 20:44:51 CST 2015
display date [[email protected] ~]# date +%f
2015-10-22
display time [[email protected] ~]# date +%t
20:46:50
==================== Other options, man date View ================
%y represents the year
%m represents the Month
%d indicates days
%h = Hour (indicates the time is 00-23)
%m = minutes
%s = seconds
%s (the number of seconds to represent the Unix timestamp)
========================================================
4. Set the date time
[[email protected] ~]# date-s "2015-10-22 20:49:22"
Thu Oct 20:49:22 CST 2015
[Email protected] ~]# date-s 2013-1-5
Sat Jan 5 00:00:00 CST 2013
[Email protected] ~]# date-s 20:22:22
Sat Jan 5 20:22:22 CST 2013
5. About hardware time Hwclock and system time
[Email protected] ~]# Hwclock
Thu Oct 08:51:24 PM CST-1.055292 seconds
[Email protected] ~]# Hwclock--hctosys
[[Email protected] ~]# Date
Thu Oct 20:51:50 CST 2015
===========HCTOSYS,SYSTOHC===HW Write Sys,sys Write hw=========================
This article from "Rookie Beginner Linux" blog, declined reprint!
Linux Date Lite Usage