-
Notifications
You must be signed in to change notification settings - Fork 65
How To Set Date And Time
Rafael Vergara edited this page Jul 14, 2021
·
6 revisions
The Homebridge Raspberry Pi Image automatically sets time using an NTP server using systemd-timesyncd
.
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.
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
- Try running
-
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. Runsudo 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-timesyncd
If you need to use a different NTP server, you can set them in the /etc/systemd/timesyncd.conf
file.