Don't forget to account for general relativity.
... another bag of worms.
And, of course, there's the everyday[1] problem of two clocks separated by a significant distance (and hence time), where "significant" is of the order of the tick duration
That's a fundamental problem; see Leslie Lamport's seminal work to find out the best that can be achieved.
[1] most frequently seen when trying to decide which version of a file is more recent, in a distributed file system.