Closed adammurnane closed 6 years ago
Why make a change like this which requires any caller of this method to change their code ?
The method directly underneath, -[NetworkClock networkTime], is supposed to return a NSDate object which is equal to the network time. With the current implementation of networkOffset, that is not the case. I looked at the history and noticed that prior calculations for the timeInterval did negate it. See https://github.com/jbenet/ios-ntp/commit/c6f2d2b7054e8f8e1bf2110ec7e384ac0e1c21da
Perhaps it might be better to negate the value returned by networkOffset in the networkTime method itself, that would also correct the issue and networkOffset would still return the same thing.
I am certain that this change is actually what was intended. If I'm incorrect about that please let me know.