Ask HN : How does time synchronization works?
When network latency is unknown, how does time synchronization works in networked computers.
It practice, however, it is reasonable to assume that latencies are randomly distributed and are largely the same in each direction. Under those assumptions it's fairly simple to come up with strategies that mostly work.
The real difficulty is finding an optimal or near-optimal strategy.
However, to answer your original question, it is provably impossible when the conditions are unknown and are allowed to be pessimal.