truetime-android
truetime-android copied to clipboard
Local area network (LAN) to build the NTP Server is not work
//ntp1.aliyun.com ok //TrueTime.build().withNtpHost("120.25.115.20").initialize();
Local area network (LAN) to build the NTP Server is not? LAN structures, I've tested the server is normal but TrueTime.build().withNtpHost("192.168.0.73").initialize(); W/System.err: at com.instacart.library.truetime.SntpClient.requestTime(SntpClient.java:159)
Who cna hlep me ?,thanks a lot
@xfdr0805 If I'm understanding this correctly, your LAN's server probably has wider dispersion than acceptable causing the build()
call to fail: https://github.com/instacart/truetime-android/blob/0630cdf3341b82c2fb16d0ff3e95c32c4ee1a78c/library/src/main/java/com/instacart/library/truetime/SntpClient.java#L158.
See this post for some context: https://serverfault.com/questions/768280/what-is-ntp-dispersion-and-how-do-i-control-it. You could increase your root dispersion or fix the server on the LAN itself.