Setting date and time in Pi

First to configure the timezone

  1. Enter the command:
    • sudo dpkg-reconfigure tzdata
  2. Link for more explanation.

Configuring time:

  1. If time differs from the current time by a significant amount, need to set manually by using the command:
    • sudo date -s “Thu Aug  9 21:31:26 UTC 2012”
  2. Configure the NTP to sync the time (require internet connection)
  3. Enter the command to edit the NTP config
    • sudo nano /etc/ntp.conf
  4. Visit the NTP website to select list of server near the region
  5. Restart the daemon:
    • sudo /etc/init.d/ntp restart
  6. For information, see the link