instacart / truetime-android

Android NTP time library. Get the true current time impervious to device clock time changes
https://tech.instacart.com/truetime/
Apache License 2.0
1.42k stars 194 forks source link

How to use TrueTime with my ntp server like 192.168.11.20:123 (Domain server = ntp server) #66

Closed tutrieuchau closed 7 years ago

tutrieuchau commented 7 years ago

I fould some app in google play can sync time with my domain like (SNTP, SyncClock) but i don't know how they do it, i think TrueTime library can do it, but when i try it alway return error "Invalid response from NTP server. root_dispersion violation. 10731.323242 [actual] > 100.000000 [expected]"

kaushikgopal commented 7 years ago

@tutrieuchau - basically the value being returned from that server you're trying (presumably 192.168.11.20 is returning an incorrect value). atleast that's what the error you posted is saying.

root dispersion > 100 means a highly inaccurate value. See the readme section explaining this

fstian commented 4 years ago

TrueTime.build().withRootDispersionMax(100000);