2

I have researched many different of ways to accurately keep time in Linux, but there are so many programs and ways of doing it. I would like to know what you guys think is the best way to keep the system clock and the RTC on the accurate time 24/7. Note: I turn my Linux machine off for extended periods of time

  • I am not aware of any method other than NTP. Can you give an example of the "many different ways" you found in your researches? – michas Mar 13 '15 at 0:38
  • There's also RTC (Realtime Clock), GPS and HF/LF time pulses that are transmitted around the world. – captcha Mar 13 '15 at 1:01
2

To me, NTP is the obvious answer. Reliable and consistent - assuming some sort of Internet connection, with an option that's enabled on many distributions to set the clock directly during the boot-up process.

However, this is an opinion-based answer, probably not suited to SE.

1

As the ultimate in non-fancy approaches, every-time i login (approximately once a day) my .bashrc runs this:

sudo rdate time-b.timefreq.bldrdoc.gov && hwclock -w

I did a little testing a year or so ago and it apparently kept my main computer within one second of official time. and yes, it should just be made into a line of a cron job, but there are untapped vistas of laziness yet to be plumbed.

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.