0

There are 5 Raspberry Pi's connected to one switch (No Internet) using LAN cables. One of the Raspberry Pi has RTC module connected and it has correct date and time. Now how can all remaining four RPi's can get time and date from that Raspberry Pi?

2
  • 1
    There are a number of solutions - ranging from setting up a NTP server to regular syncing. Frankly I wouldn't bother fiddling with an obsolete OS - the Stretch time synching has changed.
    – Milliways
    Oct 5, 2018 at 10:55
  • Although the syncing software has changed it is still NTP based, so that is not really an issue regardless of distro (though unless you have a good reason not to upgrade, you should).
    – goldilocks
    Oct 5, 2018 at 12:25

1 Answer 1

2

You could setup a NTP server - there are tutorials describing how to do this, although this requires an understanding of NTP. The clients need to be configured to use the local NTP server in /etc/ntp.conf (Jessie) or /etc/systemd/timesyncd.conf (Stretch).

A much simpler solution is to copy the date from the host (which I use when no network is available).

This can be done manually over ssh by running

ssh [email protected] sudo date -s$(date -Ins)

This could be automated using cron to run on a regular basis, but the clock in the Pi should be stable enough for most purposes for days/weeks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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