~]$ su -
Password:
date
command allows the superuser to set the system date and time manually:
YYYY
with a four-digit year, MM
with a two-digit month, and DD
with a two-digit day of the month:
~]# date +%D -s YYYY-MM-DD
~]# date +%D -s 2010-06-02
HH
stands for an hour, MM
is a minute, and SS
is a second, all typed in a two-digit form:
~]# date +%T -s HH:MM:SS
~]# date +%T -s HH:MM:SS
-u
~]# date +%T -s 23:26:00 -u
date
without any additional argument:
~]$ date
Wed Jun 2 11:58:48 CEST 2010