MPE/iX Shell and Utilities Reference Manual, Vol 1

date(1) MPE/iX Shell and Utilities date(1)
NAME
date — set and display date and time
SYNOPSIS
date [–cu][timespec]
date [–cu][+format]
DESCRIPTION
Note: The MPE/iX implementation of this utility does not function exactly as this man page
describes. For details, see the MPE/iX NOTES section at the end of this man page.
date either displays the operating system’s idea of the current date and time, or sets it to a
new value. The following example shows the default format of the date:
Wed Feb 26 14:01:43 EST 1986
Options
date accepts the following options:
–c sets or displays the date and time according to Greenwich Mean Time (Coordinated
Universal Time) using CUT as the time zone name.
–u sets or displays the date and time according to Greenwich Mean Time (Coordinated
Universal Time) using GMT as the time zone name.
Setting Date and Time
date also accepts an argument in one of two forms. If the argument does not begin with +,
date assumes it is a timespec of the form
[[[[cc]yy]mm]dd]hhmm[.ss]
where cc is the optional first 2 digits of the year, yy is the optional last 2 digits of the year, mm
is the optional number of the month (01–12), dd is the optional day of the month, hh is the
hour in 24 hour format (required), mm is the minutes (required), and ss is the optional seconds.
date uses these values to set the date and time.
Note: You must specify the hours and the minutes; other arguments are optional.
Displaying Date and Time
If the argument to date begins with a + character, date uses format to display the date.
date writes all characters in format, with the exception of the % and the character which
immediately follows it, directly to the standard output. After date exhausts the format
string, it outputs a newline character. The % character introduces a special format field similar
to the printf() function in the
C library (see Field Descriptors).
1-150 Commands and Utilities