NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | ENVIRONMENT VARIABLES | ATTRIBUTES | SEE ALSO
date is a target utility.
The date command can be started using the arun C_INIT(1M) command.
If no argument is given or if the argument begins with "+", the current date is printed. Otherwise the current date is set (if the user is trusted).
The options are as follows:
Print or set the date in UCT (universal) time.
An operand with a leading plus ("+") sign signals a user-defined format string which specifies the format in which to display the date. The format string may contain any of the conversion specifications described in the strftime(3STDC) manual page, as well as any arbitrary text. The format string for the default display is: "%a %b %e %H:%M:%S %Z"
If an operand does not have a leading plus sign, it is interpreted as a value for setting the system's notion of the current date (everything except the minutes is optional). The canonical representation for setting the date and time is:
Year in abbreviated form (for example, 89 for 1989).
Numeric month. A number from 1 to 12.
Day, a number from 1 to 31.
Hour, a number from 0 to 23.
Minutes, a number from 0 to 59.
Seconds, a number from 0 to 61 (59 plus a a maximum of two leap seconds).
The command:
date "+DATE: %m/%d/%y%nTIME: %H:%M:%S"
will display:
DATE: 11/21/87 TIME: 13:36:16
The TZ environment variable affects the execution of date.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | ENVIRONMENT VARIABLES | ATTRIBUTES | SEE ALSO