.\" Copyright (c) 1980, 1990 The Regents of the University of California.
.\" %sccs.include.redist.man%
.\" @(#)date.1 6.12 (Berkeley) %G%
.Nd display or set date and time
.Op [yy[mm[dd[hh]]]]mm[\&.ss]
displays the current date and time when invoked without arguments.
Providing arguments will format the date and time in a user-defined
Only the superuser may set the date.
The options are as follows:
Set the kernel's values for daylight savings time.
is non-zero, future calls
is used to synchronize the clocks of groups of machines.
will set the time on all of the machines in the local group.
from setting the time for other than the current machine.
Print out the date and time for
Set the kernel's values for minutes west of GMT.
specifies the number of minutes returned in
Display 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 and time.
The format string may contain any of the conversion specifications described
manual page, as well as any arbitrary text.
The format string for the default display is:
.Dl ``%a %b %e %H:%M:%S %Z %Y\en''.
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 and time.
The canonical representation for setting the date and time:
Year in abbreviated form (.e.g 89 for 1989).
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 60.
Everything but the minutes are optional.
Time changes for Daylight Saving and Standard time and leap seconds
and years are handled automatically.
.Dl date ``+DATE: %m/%d/%y%nTIME: %H:%M:n''
sets the date to June 13 1985, 4:27 PM.
sets the time to 2:32 PM, without modifying the date.
A record of date resets and time changes.
A record of the user setting the time.
.Em TSP:\ The\ Time\ Synchronization Protocol
appeared in Version 6 AT&T UNIX.
Exit status is 0 on success, 1 on if unable to set the date, and 2 on
if able to set the local date but failing to set it globally.
synchronizes the time on many hosts, the setting of a new time value may
require more than a few seconds.
prints: `Network time being set'.
The message `Communication error with timed' occurs when the communication
The system attempts to keep the date in a format closely compatible
VMS, however, uses local time (rather than GMT) and does not understand
Thus, if you use both UNIX and VMS, VMS will be running on GMT.