echo “Europe/London” | sudo tee /etc/timezone
sudo dpkg-reconfigure –frontend noninteractive tzdata
You can check if this has worked by typing date into the command line, which should show the correct date and time for your location. If for some reason the time is wrong, make sure you've typed the right timezone, or manually update your server's clock using:
date -s “08/22/20011 14:25:00″
Hopefully this will save you some time wondering why your times are wrong on your PHP scripts, or Cron scripts run at obscure times.