d
date(1) | date(1) |
The character c is not a valid format directive, ®eld width speci®er, or precision speci®er.
do you really want to run time backwards?[yes/no]
The date/time you speci®ed is earlier than the current clock value. Type yes (or the equivalent for your locale) to set the clock backwards; anything else to cancel the command.
no permission
You need the superuser privilege to change the date.
EXAMPLES
Date in Different Languages
Display the date. In this example, the TZ environment variable contains PST8PDT, and the language environment variables are set as noted.
date | → Fri | Aug | 20 | 15:03:37 | PDT | 1993 | ← C (default) | ||||
date | Aug | 20 | 22:03:37 | UTC | 1993 | ← C (default) | |||||
date | → Fri, | Aug 20, | 1993 | 03:03:37 | PM | ← en_US.roman8 (U.S. English) | |||||
date | → Fri. | 20 | Aug, | 1993 | 03:03:37 | PM | ← en_GB.roman8 (U.K. English) | ||||
date | → 20/08/1993 | 15.47.47 |
|
|
| ← pt_PT.roman8 (Portuguese) |
Set Date
Set the date to Oct 8, 12:45 a.m.
date 10080045
Display Formatted Date
Display the current date and time using a format. Note the use of quotation marks due to the blanks in the format.
date "+DATE: %m/%d/%y%nTIME: %H:%M:%S"
The output resembles the following:
DATE: 10/08/87
TIME: 12:45:05
Display Formatted Date Using Local Language Conversion
With the date as set in the "Set Date" example above and LC_TIME set to de_De.roman8 (German):
date
generates output similar to:
Okt 8 12:45
where the month ®eld is four characters long,
WARNINGS
The former
Changing the date while the system is running in multiuser mode should be avoided to prevent disrupting
The following formatting directives may be deleted from future releases: %E, %F, %o, %z.
Currently, the maximum date supported is December 31, 2037 23:59:00 UTC.
AUTHOR
date was developed by AT&T and HP.
FILES
/var/adm/wtmp
Section 1−168 | − 5 − |