DATE(1) UNIX Programmer's Manual DATE(1)
date - print and set the date
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
d
\bda
\bat
\bte
\be [-nu] [-d dst] [-t minutes_west] [yymmddhhmm [.
\b.ss] ]
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
If no arguments are given, the current date and time are
printed. Providing an argument will set the desired date;
only the superuser can set the date. The -_
\bd and -_
\bt flags set
the kernel's values for daylight savings time and minutes
west of GMT. If _
\bd_
\bs_
\bt is non-zero, future calls to _
\bg_
\be_
\bt_
\bt_
\bi_
\bm_
\be_
\bo_
\bf_
\b-
_
\bd_
\ba_
\by(2) will return a non-zero _
\bt_
\bz__
\bd_
\bs_
\bt_
\bt_
\bi_
\bm_
\be. _
\bM_
\bi_
\bn_
\bu_
\bt_
\be_
\bs__
\bw_
\be_
\bs_
\bt pro-
vides the number of minutes returned by future calls to _
\bg_
\be_
\bt_
\b-
_
\bt_
\bi_
\bm_
\be_
\bo_
\bf_
\bd_
\ba_
\by(2) in _
\bt_
\bz__
\bm_
\bi_
\bn_
\bu_
\bt_
\be_
\bs_
\bw_
\be_
\bs_
\bt. The -_
\bu flag is used to
display or set the date in GMT (universal) time. _
\by_
\by
represents the last two digits of the year; the first _
\bm_
\bm is
the month number; _
\bd_
\bd is the day number; _
\bh_
\bh is the hour
number (24 hour system); the second _
\bm_
\bm is the minute number;
.
\b._
\bs_
\bs is optional and represents the seconds. For example:
sets the date to June 13 1985, 4:27 PM. The year, month and
day may be omitted; the default values will be the current
ones. The system operates in GMT. _
\bD_
\ba_
\bt_
\be takes care of the
conversion to and from local standard and daylight-saving
If _
\bt_
\bi_
\bm_
\be_
\bd(_
\b8) is running to synchronize the clocks of machines
in a local area network, _
\bd_
\ba_
\bt_
\be sets the time globally on all
those machines unless the -
\b-n
\bn option is given.
/usr/adm/wtmp to record time-setting. In /usr/adm/messages,
_
\bd_
\ba_
\bt_
\be records the name of the user setting the time.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
gettimeofday(2), utmp(5), timed(8),
_
\bT_
\bS_
\bP: _
\bT_
\bh_
\be _
\bT_
\bi_
\bm_
\be _
\bS_
\by_
\bn_
\bc_
\bh_
\br_
\bo_
\bn_
\bi_
\bz_
\ba_
\bt_
\bi_
\bo_
\bn _
\bP_
\br_
\bo_
\bt_
\bo_
\bc_
\bo_
\bl _
\bf_
\bo_
\br _
\bU_
\bN_
\bI_
\bX _
\b4._
\b3_
\bB_
\bS_
\bD, R.
D
\bDI
\bIA
\bAG
\bGN
\bNO
\bOS
\bST
\bTI
\bIC
\bCS
\bS
Exit status is 0 on success, 1 on complete failure to set
the date, and 2 on successfully setting the local date but
Occasionally, when _
\bt_
\bi_
\bm_
\be_
\bd synchronizes the time on many
hosts, the setting of a new time value may require more than
a few seconds. On these occasions, _
\bd_
\ba_
\bt_
\be prints: `Network
time being set'. The message `Communication error with
timed' occurs when the communication between _
\bd_
\ba_
\bt_
\be and _
\bt_
\bi_
\bm_
\be_
\bd
Printed 7/9/88 April 1, 1987 1
DATE(1) UNIX Programmer's Manual DATE(1)
The system attempts to keep the date in a format closely
compatible with VMS. VMS, however, uses local time (rather
than GMT) and does not understand daylight-saving time.
Thus, if you use both UNIX and VMS, VMS will be running on
Printed 7/9/88 April 1, 1987 2