1DATE(1)                     General Commands Manual                    DATE(1)
2
3
4

NAME

6       date - print and set the date
7

SYNOPSIS

9       date [-nu] [-d dst] [-t timezone] [yymmddhhmm [.ss] ]
10

DESCRIPTION

12       If no arguments are given, the current date and time are printed.  Pro‐
13       viding an argument will set the desired date; only  the  superuser  can
14       set the date.  The -d and -t flags set the kernel's values for daylight
15       savings time and minutes west of GMT.  If dst is non-zero, future calls
16       to  gettimeofday(2)  will  return a non-zero tz_dsttime.  Timezone pro‐
17       vides the number of minutes returned by future calls to gettimeofday(2)
18       in  tz_minuteswest.   The -u flag is used to display or set the date in
19       GMT (universal) time.  yy represents the last two digits of  the  year;
20       the  first mm is the month number; dd is the day number; hh is the hour
21       number (24 hour system); the second mm is the  minute  number;  .ss  is
22       optional and represents the seconds.  For example:
23
24              date 8506131627
25
26       sets the date to June 13 1985, 4:27 PM.  The year, month and day may be
27       omitted; the default values will be the current ones.  The system oper‐
28       ates in GMT.  Date takes care of the conversion to and from local stan‐
29       dard and daylight-saving time.
30
31       If timed(8) is running to synchronize the clocks of machines in a local
32       area  network, date sets the time globally on all those machines unless
33       the -n option is given.
34

FILES

36       /usr/adm/wtmp  to  record  time-setting.   In  /usr/adm/messages,  date
37       records the name of the user setting the time.
38

SEE ALSO

40       gettimeofday(2), utmp(5), timed(8),
41       TSP:  The Time Synchronization Protocol for UNIX 4.3BSD, R. Gusella and
42       S. Zatti
43

DIAGNOSTICS

45       Exit status is 0 on success, 1 on complete failure to set the date, and
46       2 on successfully setting the local date but failing globally.
47
48       Occasionally,  when timed synchronizes the time on many hosts, the set‐
49       ting of a new time value may require more than a few seconds.  On these
50       occasions,  date prints: `Network time being set'.  The message `Commu‐
51       nication error with timed' occurs when the communication  between  date
52       and timed fails.
53

BUGS

55       The  system  attempts  to  keep the date in a format closely compatible
56       with VMS.  VMS, however, uses local time (rather than GMT) and does not
57       understand  daylight-saving  time.  Thus, if you use both UNIX and VMS,
58       VMS will be running on GMT.
59
60
61
624th Berkeley Distribution       March 24, 1987                         DATE(1)
Impressum