The time on my Raspberry Pi is off by a few days. When I try
$ sudo dpkg-reconfigure ntp
it doesn't change the time, but some stuff comes up in the syslog:
Oct 21 18:27:45 airpiClock ntpd[2142]: ntpd exiting on signal 15
Oct 21 18:27:51 airpiClock ntpd[2758]: ntpd 4.2.6p5@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)
Oct 21 18:27:51 airpiClock ntpd[2759]: proto: precision = 1.000 usec
Oct 21 18:27:51 airpiClock ntpd[2759]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Oct 21 18:27:51 airpiClock ntpd[2759]: Listen normally on 1 lo 127.0.0.1 UDP 123
Oct 21 18:27:51 airpiClock ntpd[2759]: Listen normally on 2 wlan0 192.168.2.141 UDP 123
Oct 21 18:27:51 airpiClock ntpd[2759]: peers refreshed
Oct 21 18:27:51 airpiClock ntpd[2759]: Listening on routing socket on fd #19 for interface updates
Oct 21 18:27:51 airpiClock ntpd[2759]: restrict: error in address '::' on line 38. Ignoring...
I found that when I reverted from a static IP address to DHCP and rebooted, the date and time were corrected. I need to keep a static IP address, but I also need to be able to accurately schedule tasks, so the date and time must be correct.
This is what my /etc/network/interfaces
file looks like:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address 192.168.2.143
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1
wpa-ssid "ssid"
wpa-psk "password"
What do I need to change in order to be able to have a static IP address and accurate time?