9

Will NTP move the system clock backwards? I'm thinking about creating unique ids which are partially based on the time. If the clock is moving backwards, I'd need to somehow account for that.

  • system clock will jump backwards. In very rare cases it might be NTP doing a so-called "step" backwards (instead of a "slew"), see eecis.udel.edu/~mills/ntp/html/clock.html. However, it's more likely that common operational patterns / mistakes will make your system clock jump around. – Jan-Philip Gehrcke yesterday
13

ntpd will try to prevent time from moving backwards by slowing down the system clock until everything is in sync. If the system clock is too far ahead, however, ntpd will complain and you'll either need to adjust manually or pass the -g flag to ntpd to allow it to make one (and only one) big adjustment.

7

Two things could happen. The clock could be adjusted back, or the ntpd server will keep adjusting the RTC clock until the two clocks are in sync. Effectively, this looks like the local clock time has slowed down while waiting for the server to catch us up. This process is called slew correction.

Which option is chosen by the ntp client depends on configuration. Consult the man page in your system to ensure that the slew option is chosen so that the time doesn't drift backwards. Note that the time can be allowed to drift backwards if it is significantly out. So watch for that. Also, be aware of daylight savings. That could be a hole in your design anyway.

See NTP docs... http://doc.ntp.org/4.1.0/ntpd.htm and the section named "how ntp operates". for further information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.