Skip to content

How To Set Date And Time

oznu edited this page Mar 8, 2021 · 6 revisions

The Homebridge Raspberry Pi Image automatically sets time using an NTP server using systemd-timesyncd.

Problems Caused By Not Having Correct Date / Time

Not having the correct date and time on your device can cause many issues:

  • Inability to install or update plugins as the remote server SSL certificate can't be verified.
  • Plugins may not to be able to talk to remote servers as SSL certificate can't be verified.
  • Logs will show incorrect timestamp.

Reasons Why Date / Time Might Not Automatically Have Been Set

The date / time not automatically being set may be a symptom of a bigger issue:

  • No internet access. The Homebridge Raspberry Pi Image requires access to the internet to get the correct time from the NTP server.
  • Cannot resolve DNS. Make sure your device is being assigned valid DNS servers:
    • Try running ping 0.debian.pool.ntp.org and make sure you get a response.
    • Check your current DNS server by running cat /etc/resolv.conf
    • If you have an Eero router, the security settings may be blocking DNS requests see How To Fix Eero Router Internet and DNS Connectivity Issues for more information.
    • If you need to manually configure the DNS server settings run sudo nmtui and edit your network connection
  • Network Firewall Blocking Traffic. Make sure your network is configured to allow connections to the Debian NTP servers:
    • 0.debian.pool.ntp.org
    • 1.debian.pool.ntp.org
    • 2.debian.pool.ntp.org
    • 3.debian.pool.ntp.org
  • Check systemd-timesyncd logs. Run sudo journalctl -u systemd-timesyncd and look for any errors.

You can restart the systemd-timesyncd to trigger a date/time sync:

sudo systemctl restart  systemd-timesync