Symptom:
Ubuntu Server edition generates incorrect timestamps. For example, when issuing the date command or using the date() function in PHP.
Cause:
The server isn’t properly synchronized to an NTP (Network Time Protocol) server.
Solution:
Install an NTP time server
sudo apt-get install ntp
Troubleshooting Steps:
- Installed NTP server with sudo apt-get install ntp
- Tried to get update from Ubuntu’s NTP server with sudo ntpupdate ntp.ubuntu.com
- Checked time zone with more /etc/timezone
- Waited a couple of minutes
References:
http://www.christopherirish.com/2012/03/21/how-to-set-the-timezone-on-ubuntu-server/