1RDATE(8) BSD System Manager's Manual RDATE(8)
2
4 rdate — set the system's date from a remote host
5
7 rdate [-46acnpsv] host
8
10 rdate displays and sets the local date and time from the host name or
11 address given as the argument. The time source may be an RFC 868 TCP
12 protocol server, which is usually implemented as a built-in service of
13 inetd(8), or an RFC 2030 protocol SNTP/NTP server. By default, rdate
14 uses the RFC 868 TCP protocol.
15
16 The options are as follows:
17
18 -4 Forces rdate to use IPv4 addresses only.
19
20 -6 Forces rdate to use IPv6 addresses only.
21
22 -a Use the adjtime(2) call to gradually skew the local time to the
23 remote time rather than just hopping.
24
25 -c Correct leap seconds. Sometimes required when synchronizing to
26 an NTP server. When synchronizing using the RFC 868 protocol,
27 use this option only if the server does not correctly account for
28 leap seconds. You can determine if you need this parameter if
29 you sync against an NTP server (with this parameter) or (recom‐
30 mended) check with a local radio controlled watch or phone ser‐
31 vice.
32
33 -n Use SNTP (RFC 2030) instead of the RFC 868 time protocol.
34
35 -p Do not set, just print the remote time.
36
37 -s Do not print the time.
38
39 -v Verbose output. Always show the adjustment.
40
42 /var/log/wtmp record of date resets and time changes
43
45 To get the legal time in Germany, set the /etc/localtime symlink to
46 /usr/share/zoneinfo/right/Europe/Berlin and issue the following command:
47
48 # rdate -ncv ptbtime1.ptb.de
49
50 The command of course assumes you have a working internet connection and
51 DNS set up to connect to the server at Physikalisch-Technische
52 Bundesanstalt in Braunschweig, Germany.
53
54 To gradually adjust time once an hour after the first "step" adjustment,
55 put the following line into root's crontab:
56
57 58 * * * * rdate -ncav ptbtime1.ptb.de | logger -t NTP
58
60 date(1), adjtime(2), inetd(8), ntpd(8), timed(8)
61
62BSD June 20, 2019 BSD