HP StorageWorks XPath OS 7.4.X Command Reference Guide (AA-RVHCC-TE, September 2005)
XPath OS 7.4.x command reference guide 53
Displays or sets date and time.
Synopsis
date [-nu] [-r seconds] [+format]
date [[[[[cc]yy]mm]dd]hh]mm[.ss]
Description
Use this command to display the current date and time. Providing arguments formats the date and time in
a user-defined method or sets the date. Only admin can set the date. The date is read-only if
tsClockServer is set to an external time server.
Operands
This command has the following optional operands:
An operand with a leading plus sign (+) signals a user-defined format string that specifies the format in
which to display the date and time. The format string can contain any of the conversion specifications
described in the strftime manual page, as well as any arbitrary text. A <newline> character is
always displayed after the characters specified by the format string.
The format string for the default display is:
%a %b %e %H:%M:%S %Z %Y
If an operand does not have a leading plus sign, it is interpreted as a value for setting the current date and
time of the system. The canonical representation for setting the date and
time is:
Everything but the minutes is optional.
Time changes for Daylight Saving time, Standard time, leap seconds, and leap years are handled
automatically.
date
-n The utility named timed (a time server daemon) synchronizes the clocks
on groups of machines. By default, if timed is running, date sets the
time on all the machines in the local group. The -n option stops date
from setting the time for any machine other than the current machine.
-r Prints the date and time that is seconds from the epoch.
-u Displays or sets the date in UTC (Coordinated Universal Time).
cc The first two digits of the year (the century).
yy The second two digits of the year. If yy is specified but cc is not, a value
for yy between 69 and 99 results in a cc value of 19. Otherwise, a cc
value of 20 is used.
mm The month of the year, from 01 to 12.
dd The day of the month, from 01 to 31.
hh The hour of the day, from 00 to 23.
mm The minute of the hour, from 00 to 59.
ss The second of the minute, from 00 to 61.