date -- print or set the system date and time


date is as specified in the SUS but with differences as listed below.

LSB Deprecated Differences

The behaviors specified in this section are expected to disappear from a future version of the LSB; applications should only use the non-LSB-deprecated behaviors.

-d, --date=STRING

displays time described by STRING, not now.

-f, --file=DATAFILE

is like --date once for each line of DATEFILE.

-r, --reference=FILE

displays the last modification time of FILE.

-R, --rfc-822

outputs RFC2822-compliant date string.

-s, --set=STRING

sets time described by STRING.

--utc, --universal

is equivalent to the -u option as specified in the SUS.


outputs version information and exits.