.TH RDATE 1 3/24/85 .CM 1 .SH "NAME" rdate \- get the date and time via the network .SH "SYNOPSIS" .B rdate [\-p] [\-s] [\-u] [host...] .SH "DESCRIPTION" .B Rdate uses TCP or UDP to retrieve the current time of another machine using using the protocol described in RFC 868. The time for each system is returned in ctime(3) format. The following is an example: .nf .IP "" % rdate uci mc [uci] Sun Mar 24 20:35:41 1985 [mc] Sun Mar 24 20:36:19 1985 .fi .SS OPTIONS .TP .I \-p Print the time retrieved from the remote machines. This is the default mode. .TP .I \-s Set the local system time from the time retrieved from the remote machine. This, quite naturally, is only effective for root. .TP .I \-u Use UDP to retrieve the time instead of TCP. The client will timeout if no reply is received within 5 seconds. .SH FILES .nf /etc/services map service name to socket number /etc/hosts map host name to internet address .fi .SH HISTORY .TP 24-Mar-85 Lee Moore at University of Rochester Created. .TP 10-Oct-94 Andy Tefft Updated for Linux 1.1.52. Set system time when run as root. .TP 23-Sep-96 Richard Henderson Fixed 32-bit assumptions and added mode options. .TP 04-May-99 Ken Yap Added code to use UDP. .SH BUGS Timeout handling on UDP doesn't work after the first server. Something to do with signal(2) semantics I don't understand.