1.\" $OpenBSD: rdate.8,v 1.40 2023/11/12 18:53:22 otto Exp $ 2.\" $NetBSD: rdate.8,v 1.4 1996/04/08 20:55:17 jtc Exp $ 3.\" 4.\" Copyright (c) 1994 Christos Zoulas 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd $Mdocdate: November 12 2023 $ 28.Dt RDATE 8 29.Os 30.Sh NAME 31.Nm rdate 32.Nd set the system's date from a remote host 33.Sh SYNOPSIS 34.Nm rdate 35.Op Fl 46acnopsv 36.Ar host 37.Sh DESCRIPTION 38.Nm 39displays and sets the local date and time from the 40host name or address given as the argument. 41The time source may be an RFC 5905 protocol SNTP/NTP server 42or an RFC 868 TCP protocol server, 43which is usually implemented as a built-in service of 44.Xr inetd 8 . 45By default, 46.Nm 47uses the RFC 5905 SNTP/NTP protocol. 48.Pp 49The options are as follows: 50.Bl -tag -width Ds 51.It Fl 4 52Forces 53.Nm 54to use IPv4 addresses only. 55.It Fl 6 56Forces 57.Nm 58to use IPv6 addresses only. 59.It Fl a 60Use the 61.Xr adjtime 2 62call to gradually skew the local time to the 63remote time rather than just hopping. 64.It Fl c 65Correct leap seconds. 66This should be used only when synchronizing to a server 67which does not correctly account for leap seconds. 68.It Fl n 69Use SNTP (RFC 5905) instead of the RFC 868 time protocol. 70This is the default. 71This protocol counts 32 bits of seconds from January 1, 1900 72and will handle rollover to a new NTP era in February 2036. 73.It Fl o 74Use an RFC 868 TCP protocol server instead of SNTP. 75This protocol is obsolete as it is not capable of representing 76dates past January 19, 2038 03:14:07 GMT. 77.It Fl p 78Do not set, just print the remote time. 79.It Fl s 80Do not print the time. 81.It Fl v 82Verbose output. 83Always show the adjustment. 84.El 85.Sh FILES 86.Bl -tag -width /var/log/wtmp -compact 87.It Pa /var/log/wtmp 88record of date resets and time changes 89.El 90.Sh SEE ALSO 91.Xr date 1 , 92.Xr adjtime 2 , 93.Xr inetd 8 , 94.Xr ntpd 8 95