Date command summary, date command
The date command displays or sets the system time and date.
Date (option) (parameter)
-D <string>: displays the date and time specified by the string. Double quotation marks must be added before and after the string;
-S <string>: Specifies the date and time based on the string. Double quotation marks must be added before and after the string;
-U: displays GMT;
-- Help: online help;
-- Version: displays version information.
<+ Time and date format>: Specifies the date and time format used for display.
% H hour, in 24-hour format (00 ~ 23)
% I hour, in 12-hour format (01 ~ 12)
% K hour, in 24-hour format (0 ~ 23)
% L hour, in 12-hour format (1 ~ 12)
% M minutes (00 ~ 59)
% P displays AM or PM
% R display time, in 12-hour format (hh: mm: ss % p)
% S number of seconds that have elapsed since 00:00:00, January 1, January 1, 1970
% S display seconds (00 ~ 59) % T display time, in the 24-hour format (hh: mm: ss)
% X display time format (% H: % M: % S)
% Z display time zone, date domain (CST)
% A (Sun ~ Sat)
% A full name of the Week (Sunday ~ Saturday)
% H, % B (Jan ~ Dec)
% B FULL NAME (January ~ December)
% C date and time (Tue Nov 20 14:12:58 2012)
% D the day of the month (01 ~ 31)
% X, % D Date (mm/dd/yy)
% J the day of the year (001 ~ 366)
% M month (01 ~ 12)
% W the day of a week (0 represents Sunday)
% W the week of the year (00 ~ 53, Monday is the First Day)
% Y the last two digits of the year (1999 is 99)