S is for snakeoil
Last update:
This program is a Simple Network Time Protocol (SNTP) client that can be used to query a Network TIme Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root it can correct the system clock to this offset as well. It can be run as an interactive command or from a script by a cron job. The program implements the SNTP protocol defined in RFC-2030, which is a subset of the NTP protocol defined in RFC-1305, but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP implementation.
While this program can do other things, including operation as a primitive server, some of these things are truly dangerous in a ubiquitous public time server network. A full disclosure is in the man page in the ./sntp directory, but be truly advised RFC-2030 specifically forbids a SNTP client to operate as a server for other NTP or SNTP clients. If such operation is contemplated, do not allow access by clients on the public Internet.
By default, sntp writes the local date and time (i.e., not UTC) to the standard output in the format
1996 Oct 15 20:17:25.123 + 4.567 +/- 0.089 secs,
where the + 4.567 +/- 0.089 secs indicates the time offset and error bound of the system clock relative to the server clock.
If a NTP server address is explicitly specified, the program sends a single message to the server and waits up to delay seconds for a unicast server message. Otherwise, it sends no message and waits up to delay seconds for a broadcast server message.
sntp recognizes the following options:
The program returns an exit status of zero for success and non-zero otherwise.
sntp was developed by N.M. Maclaren of the University of Cambridge Computing Service.