Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

date(1) OSS Shell and Utilities Reference Manual
NAME
date - Display the date and time
SYNOPSIS
date [-u][+format]
The date command displays the date and time.
FLAGS
-u Performs operations as if the TZ environment variable was set to the string UTC0 or
its equivalent historical value GMT0. Otherwise, the date command uses the time
zone indicated by the TZ environment variable or the system default time zone if that
variable is not set.
DESCRIPTION
The date command writes the current date and time to the standard output file if called with no
flags or with a flag list that begins with a + (plus sign). Do not use the date command to change
or set the date and time; use Guardian utilities instead.
The LC_TIME variable, if it is defined, controls the ordering of the day and month numbers in
the date specifications. The default order is mmddHHMM.SSyy,where:
mm is the month number (01=January).
dd is the number of the day in the month.
HH is the hour in the day (using a 24-hour clock).
MM is the minute number.
SS is the number of seconds.
yy is the last two numbers of the year.
The yymmddHHMM[.SS] format cannot be used if the year is in the range 01-12 (this is how the
date command differentiates between the two formats).
If the locale defines ordering such that the day is specified before the month, the format is
ddmmHHMM[.SS[yy]], yyddmmHHMM[.SS], or ddmmHHMM[yy].
The current month, day, hour, and year are default values. The system operates in Coordinated
Universal Time (UTC).
If you follow keyword date with a + (plus sign) and a field descriptor, you can control the output
of the command. You must precede each field descriptor with a % (percent sign). The system
replaces the field descriptor with the specified value. Enter a literal % as %%. The date com-
mand copies any other characters to the standard output file without change. date always ends
the string with a newline character. Output fields are fixed size (zero-padded if necessary).
The date command prints out a usage message on any unrecognized flags or input.
Field Descriptors
a Displays the locale’s abbreviated weekday name (Sun through Sat or the nonEnglish
equivalent).
A Displays the locale’s full weekday name.
b Displays the locale’s abbreviated month name.
B Displays the locale’s full month name.
32 Hewlett-Packard Company 527188-003