DATE(1) BSD DATE(1)
NAME
date - print and set the date
SYNOPSIS
date [ -n ] [ -u ] [ yymmddhhmm[.ss] ]
DESCRIPTION
If you don't specify an argument, date prints the current date and time.
Providing an argument sets the desired date. Only the super-user can set
the date.
OPTIONS
-u Display or set the date in GMT (universal time).
yymmddhhmm[.ss]
If you're setting the date, yy represents the last two digits
of the year; the first mm is the month number; dd is the day
number; hh is the hour number (24-hour system); the second mm
is the minute number; .ss is optional and represents the
seconds.
For example:
date 8906131627
sets the date to June 13 1989, 4:27 PM. The year, month and
day can be omitted; the default values will be the current
ones. The system operates in GMT. The date command takes care
of the conversion to and from local standard and daylight-
saving time.
-n If timed is running to synchronize the clocks of machines in a
local area network, date sets the time globally on all those
machines, unless you specify the -n option. This option is not
supported by Domain/OS BSD.
DIAGNOSTICS
Exit status is 0 on success; 1 on complete failure to set the date; 2 on
successfully setting the local date but failing globally.
FILES
/usr/adm/wtmp To record time-setting.
/usr/adm/messages To record the name of the user setting the time.
SEE ALSO
gettimeofday(2), utmp(5)