Raspberry Pi date and time

Since the Raspberry Pi don't have a realtime clock, here is how to set it manually and get the right time from time servers. Obviously, the Pi need to be connected to The Internet to do this. First, edit your ntp configuration:

sudo nano /etc/ntp.conf

Go to http://support.ntp.org/bin/view/Servers/NTPPoolServers and find servers for your region. Replace the servers in the ntp.conf file and save it. Then restart the ntp daemon with:

sudo /etc/init.d/ntp restart

Next you may need to set the right time zone. Use the following command:

sudo dpkg-reconfigure tzdata

Now, type

date

to see it your date and time is correct.

Tags: