Set date and time on startup using htdate

I need to install a router inside a network where ntp-request are blocked.

How do I set the date and time on the router (at startup) using the htdate package?

Best regards

Google man htpdate ?

You probably mean htpdate?
Just install the package into the image. It seems to have a default config included.

( I have never tried the package, but it looks straightforward)

Just a few things to consider:

  • maybe a device with battery backed rtc would make sense (x86_64)
  • maybe external means to sync the clock could be considered (GPS, DCF77 et al)
  • maybe you could run an internal ntp server