The Raspberry Pi doesn't have a real time clock (RTC) so when your Raspberry Pi loses power, the time isn't kept accurate. You can buy a real time clock for the Pi ot you can run a time server on the Pi to keep the time on the Raspberry Pi accurate. Luckily, this only takes a few minutes to set up and you'll be keeping pifect time :)

Right, enough of the Raspberry Pi time jokes, lets get started... First type in date to see the current time:


Next, install ntpdate:

sudo apt get install ntpdate

Now remove the current local time file and make a new symbolic link to your timezone file:

sudo rm /etc/localtime

ls /usr/share/zoneinfo

ls /usr/share/zoneinfo/Europe

sudo ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

Finally, restart the ntp service:

sudo service ntp restart

Your date should now be up to date. You can check this by typing:



comments powered by Disqus