I have an incorrect time in my Ubuntu server, I'm using Ubuntu Server 14.04
When I run date
command this is the result:
lun 8 set 2014, 08.28.03, CEST
The correct hour is 10.40.
This is what solved the issue for me:
check for all timezones, and find yours
timedatectl list-timezones
"America/New_York" matches my zone, so I ran this:
sudo timedatectl set-timezone America/New_York
...Then check the date
date
voilá
Your hardware clock is probably set to UTC. To verify:
grep UTC /etc/default/rcS
This should give you something like:
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=no
... with UTC being either yes or no. You probably need to configure this.
Read here how to setup ntpd to always have the correct time.
sudo ntpdate ntp.ubuntu.com
and I have the correct hour now.. But I don't understand if my server update the correct hour every day automatically or no..
– Teo
Sep 08 '14 at 09:07
ntpdate
with a known NTP server (likentp.ubuntu.com
) to sync it. – muru Sep 08 '14 at 08:49