ntplib
ntplib copied to clipboard
for #20
Probably the wrong way to do this but I needed a way to select what address family to use when doing a query to an NTP server (IPv4, IPv6 or...
Can ntplib run asynchronously? not block coroutine.
When the client thinks the current time is after the year 2037, the library fails to make an NTP request. This can be easily demonstrated using [the faketime library](https://packages.debian.org/stable/faketime): ```pytb...
…ollover. NTPv3 has a rollover in 2036 - see https://en.wikipedia.org/wiki/Network_Time_Protocol#Timestamps. Raise a specific exception if the system time is beyond that rollover, to make it easier for users to understand...
Related to #27. This code randomize the returned ip addresses so that the load is shared around the pool.
Presently the `getaddrinfo` code always uses the first returned value. For NTP pools this could be improved such that more than just the first entry is used. ``` >>> import...
As per issue-35. The README example is updated: ``` >>> ntplib.ref_id_to_text(response.ref_id, response.stratum) 193.190.230.66 ``` If this was a stratum 0 or 1 source then it could do something like this:...
When doing an NTP server, if we receive a NTP request from a client, the byte data is converted to a float by the NTP_Packet::from_data. More precisely it reassemble the...