[ntp:questions] How to keep fake time in past/future?
joegwinn at comcast.net
Sun May 1 13:14:59 UTC 2011
In article <slrnirobu0.8be.unruh at wormhole.physics.ubc.ca>,
unruh <unruh at wormhole.physics.ubc.ca> wrote:
> On 2011-04-30, Joseph Gwinn <joegwinn at comcast.net> wrote:
> > In article <slrnirllcv.g22.unruh at wormhole.physics.ubc.ca>,
> > unruh <unruh at wormhole.physics.ubc.ca> wrote:
> >> On 2011-04-29, Cristian Seres <cristian-2 at contrasec.fi> wrote:
> >> > Hi!
> >> >
> >> > How would you implement an NTP server which would need to offer a time
> >> > set deliberately in past/future, say 365*86400 seconds, or even better -
> >> > first set the freely chosen date on NTP server and then keep the hours,
> >> > minutes and seconds in sync with the real time?
> >> >
> >> Perhaps you could tell us why in the world you would want to do that?
> > It's very common, actually. For instance, in Air Traffic Control they
> > record everything, and later play prior events back, to figure out what
> > happened.
> > Alternately, very large and complex training scenarios are written, the
> > scenario happening at some time different from the present, perhaps
> > past, perhaps future.
> And why do we not hear from Seres who could tell us why, instead of us
> all guessing here. Any of the guesses I have seen have been trivially
> satisfied by simply killing ntpd and resetting the computer's clock. The
> OP wanted the milliseconds to be right, but the days or years wrong.
> Or if you want set up one computer with LOCAL clock as only source, and
> set the the inappropriate time, (without any other source of time) reset
> the clock and have the others use it as their server. But of course the
> milliseconds will not be right. But why are we not hearing from the
> person who presumably knows why they want their computer clock
> mistreated thus?
Well, I don't know the details of that system, but for instance if one
wished to test tolerance for leap seconds, it's necessary to abuse those
hapless clocks. I've done this by manually resetting the clocks. This
can really upset radar trackers if they aren't designed to tolerate the
occasional one-second step discontinuity. Negative leaps are worse than
As for simulation, probably the most common approach is to leave GPS,
NTP, and the local computer clocks alone, instead interposing a software
layer that can inject the needed constant offset. But this only works
if one is able to install such a layer.
More information about the questions