Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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