4

I'm not able to set the correct time on my Ubuntu 14.04 system. It is always nine minutes behind the correct time and makes me being chronically late. Approaches that failed:

  1. ntpdate

    sudo service ntp stop
    sudo ntpdate -s 0.de.pool.ntp.org
    

    The command seems to be executed correctly. No change in time offset though.

  2. ntpd

    sudo service ntp restart
    sudo service ntp stop
    sudo ntpd -q -g -x -n
    

    restart successful, correct time servers checked in /etc/ntp.conf. No success. The command in the third line remains unresponsive.

  3. hwclock

    sudo hwclock --set --date="2014-07-04 11:22:00"
    date
    Fri Jul  4 11:14:59 CEST 2014
    

    Executes flawlessly. No change.

My question is related to System time off by a small amount but there is no solution given.

alodi
  • 205

3 Answers3

4

You can use the date command to set the time:

sudo date -s "2014-07-04 10:53:59"

For more info, you can look at the manual page by running:

man date

If you want to ntp and network time, you may just need to set the server as described here.

Wilf
  • 30,194
  • 17
  • 108
  • 164
  • I have been successful using the GUI interface and set the time manually there, which is probably the same as using date -s. Still I wonder why the automatic sync does not work. I checked the servers and they seem to respond correctly... – alodi Jul 04 '14 at 10:01
1

sudo dpkg-reconfigure tzdata worked for me

  • I tried. To no avail. The problem is still nagging me because the internal clock seems to be off a little and after a while I have to readjust with date -s – alodi Aug 26 '15 at 07:14
0

You can only set times in the future, setting past times with date command will do nothing and no error will be shown. Ntpd service will correct slowly the time at small steps. It's not like in Windows where you can set any time and see the result immediately.