4

On Ubuntu server the time is wrong:

Time from Google:

UTC: Wednesday, May 18, 2016 5:31 AM (UTC)

Asia\Riyadh: Wednesday, May 18, 2016 8:31 AM (GMT+3)

Time on my server timedatectl:

      Local time: Wed 2016-05-18 11:27:27 AST
  Universal time: Wed 2016-05-18 08:27:27 UTC
        RTC time: Wed 2016-05-18 08:27:27
       Time zone: Asia/Riyadh (AST, +0300)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no

Note: I am not dual booting with Windows. Ubuntu Server is the only OS on my server.

malhobayyeb
  • 1,422
  • 2
    Is your computer a dual-boot computer? For example, Ubuntu and Windows? If so, take a look at this: https://help.ubuntu.com/community/UbuntuTime . Scroll down to "Multiple Boot Systems Time Conflicts". A similar question on this site (with the same site as the answer): http://askubuntu.com/questions/169376/clock-time-is-off-on-dual-boot . – Ray May 18 '16 at 07:01

1 Answers1

6

Install the network time protocol daemon. This will allow you to sync your system time over the internet.

sudo apt install ntp ntpdate

Once installed, run the following command:

ntpdate pool.ntp.org

This will link your computer with the time servers of the NTP Pool Project. For me my clocks fixed themselves quickly after running the command. And that was it. After running the following command and setting the system clock, run:

hwclock --systohc
MrMartin
  • 248