Initial time sync #1429
-
How would I sync time initially? Currently my clock is off by roughly -5200s, so I added to the configuration
Is there a more elegant way to force time sync initially? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The reason we have this Generally a clock is unlikely to be so far ahead in the future compared to the real time. Either it was set to some factory setting (because of being a new device or because the clock completely lost power) which is probably some very old date. Or alternatively a clock was previously set to a time relatively close to the real time. Of course over time the clock could drift a little and could thus end up running a little ahead of the real time, but that time is unlikely to be more than a few minutes. If your clock state is in one of these two scenarios, the default ntpd-rs config should already work correctly. It appears your computer is not in one of these states, which again, probably indicates something weird is happening, and you probably want to figure out what caused that state, which is why ntpd-rs gives an error by default and refuses to make the step. You've already changed the config to allow for larger backwards steps, and you could disable this mechanism entirely by setting the backward step to |
Beta Was this translation helpful? Give feedback.
-
I ended up in this state, because openntpd stopped syncing the clock a few weeks/months ago due to some DNS issue. Over time the clock drifted quite a bit. Sure, the defaults are fine (I would even be more conservative and set them to lower values, i.e. 180 instead of 1800), but in cases like mine, where the machine wasn't running an NTP client for a while or for new machines where the time is often not set correctly and off by a day or so, a simple |
Beta Was this translation helpful? Give feedback.
-
I agree that it would be nice to have such a command, I've added #1494 to the list of issues, but I'm not sure when we'll be able to get to implementing this. |
Beta Was this translation helpful? Give feedback.
I agree that it would be nice to have such a command, I've added #1494 to the list of issues, but I'm not sure when we'll be able to get to implementing this.