Set the local time and date by polling NTP servers
ntpdate [-46bBdqsuv] [-a key] [-e authdelay] [-k keyfile] [-M i=your_hostname] [-o version] [-p samples] [-t timeout] server [...]
QNX Neutrino
Use the ntpdate utility to set the local time and date by polling NTP (Network Time Protocol) servers. The accuracy and reliability of this utility depends on the number of servers, the number of polls each time it is run, and the interval between runs.
At boot time, you may use a host startup script to run the ntpdate utility in order to set the clock. If necessary, you can also run this utility manually. Using the host script to set time initially is sometimes useful, e.g., set the time before you start the NTP daemon, ntpd. You can also run ntpdate from a cron script. The accuracy of the ntpdate utility is limited.
You use an -M option to support broadcast and multicast messages. Use -M i=hostname to join the multicast group. You are now able to listen for broadcast and multicast messages from an broadcast/multicast enabled server.
Use the ntpdate utility to adjust time in two ways:
The latter technique is less disruptive and more accurate when the error is small, and works quite well when ntpdate is run by cron every hour or two.
When the ntpd utility is running on the same host, the ntpdate utility doesn't set the date.
You may force the DNS resolution to the IPv4 (or IPv6) namespace, if you use a -4 (or -6) option that precedes a host name.
Since the time adjustment is actually 50% larger than the measured offset, it tends to keep a badly drifting clock more accurate. This is not good, however, for some kernel variables such as tick or tickadj.