4

Update: Please find a little how to solve it at the end of the question!

=========================================================

I cannot set date to the correct time:

root# date
Mi 16. Sep 19:24:42 CEST 2020
root# date --set="2016-07-01 19:41:30"
Fr 1. Jul 19:41:30 CEST 2016
root# date
Mi 16. Sep 19:26:03 CEST 2020
root# sudo dpkg-reconfigure tzdata
Current default time zone: 'Europe/Berlin'
Local time is now:      Wed Sep 16 19:27:45 CEST 2020.
Universal Time is now:  Wed Sep 16 17:27:45 UTC 2020.
root# hwclock
Fr 01 Jul 2016 19:43:45 CEST  -0.281726 Sekunden
root# sudo date --set="2016-07-01 19:46:59.990"
Fr 1. Jul 19:46:59 CEST 2016
root# date
Mi 16. Sep 19:30:31 CEST 2020

How can I set the time correctly?

I noticed the following:

# sudo ntpdate ptbtime1.ptb.de
4 Jul 20:34:24 ntpdate[12575]: step time server 192.53.103.108 offset -132709448.892320 sec

The offset of -132709448.892320 sec are about 4.2 years. How can I remove this offset?

I can increase the year with:

date --set "1 year"

But I cannot decrease the year with:

date --set "-1 year"

The command date returns in the later case the same date as before the "-1 year". Is this a bug?

Kubuntu 14.04 LTS (3.13.0-66-generic) dominantly as server.


I tried the time setting via KDE but I get the same result. I cannot change the date/time.

# ntpdate -d
18 Sep 21:23:23 ntpdate[19635]: ntpdate 4.2.6p5@1.2349-o Thu Feb 11 18:28:58 UTC 2016 (1)
18 Sep 21:23:23 ntpdate[19635]: no servers can be used, exiting
# ntpdate-debian -d
18 Sep 21:25:27 ntpdate[19992]: ntpdate 4.2.6p5@1.2349-o Thu Feb 11 18:28:58 UTC 2016 (1)
Looking for host 0.ubuntu.pool.ntp.org and service ntp
host found : clint.blazing.de
Looking for host 1.ubuntu.pool.ntp.org and service ntp
host found : static.140.107.46.78.clients.your-server.de
Looking for host 2.ubuntu.pool.ntp.org and service ntp
host found : smash-net.org
Looking for host 3.ubuntu.pool.ntp.org and service ntp
host found : ns2.customer-resolver.net
Looking for host ntp.ubuntu.com and service ntp
host found : golem.canonical.com
transmit(85.220.190.246)
receive(85.220.190.246)
transmit(129.250.35.250)
receive(129.250.35.250)
transmit(78.46.53.8)
receive(78.46.53.8)
transmit(195.50.171.101)
receive(195.50.171.101)
transmit(78.46.107.140)
receive(78.46.107.140)
transmit(148.251.84.200)
receive(148.251.84.200)
transmit(5.189.152.108)
receive(5.189.152.108)
transmit(217.79.181.50)
receive(217.79.181.50)
transmit(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
receive(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
transmit(2a01:238:439c:1900::3:1)
receive(2a01:238:439c:1900::3:1)
transmit(85.220.190.246)
transmit(2a01:4f8:120:710b::123)
receive(85.220.190.246)
receive(2a01:4f8:120:710b::123)
transmit(129.250.35.250)
transmit(2a01:4f8:121:4e4:1:2:3:4)
receive(2a01:4f8:121:4e4:1:2:3:4)
receive(129.250.35.250)
transmit(78.46.53.8)
transmit(148.251.68.100)
receive(78.46.53.8)
receive(148.251.68.100)
transmit(195.50.171.101)
transmit(5.9.122.148)
receive(195.50.171.101)
receive(5.9.122.148)
transmit(78.46.107.140)
transmit(213.95.200.110)
receive(78.46.107.140)
receive(213.95.200.110)
transmit(148.251.84.200)
transmit(144.76.96.7)
receive(148.251.84.200)
receive(144.76.96.7)
transmit(5.189.152.108)
transmit(62.116.130.3)
receive(5.189.152.108)
receive(62.116.130.3)
transmit(217.79.181.50)
transmit(146.0.32.144)
receive(217.79.181.50)
receive(146.0.32.144)
transmit(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
transmit(85.25.195.205)
receive(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
receive(85.25.195.205)
transmit(2a01:238:439c:1900::3:1)
transmit(144.76.172.53)
receive(2a01:238:439c:1900::3:1)
receive(144.76.172.53)
transmit(85.220.190.246)
transmit(2a01:4f8:120:710b::123)
transmit(2001:67c:1560:8003::c7)
receive(85.220.190.246)
receive(2a01:4f8:120:710b::123)
receive(2001:67c:1560:8003::c7)
transmit(129.250.35.250)
transmit(2a01:4f8:121:4e4:1:2:3:4)
transmit(91.189.89.199)
receive(2a01:4f8:121:4e4:1:2:3:4)
receive(91.189.89.199)
receive(129.250.35.250)
transmit(78.46.53.8)
transmit(148.251.68.100)
transmit(91.189.94.4)
receive(78.46.53.8)
receive(148.251.68.100)
receive(91.189.94.4)
transmit(195.50.171.101)
transmit(5.9.122.148)
receive(195.50.171.101)
receive(5.9.122.148)
transmit(78.46.107.140)
transmit(213.95.200.110)
receive(78.46.107.140)
receive(213.95.200.110)
transmit(148.251.84.200)
transmit(144.76.96.7)
receive(148.251.84.200)
receive(144.76.96.7)
transmit(5.189.152.108)
transmit(62.116.130.3)
receive(5.189.152.108)
receive(62.116.130.3)
transmit(217.79.181.50)
transmit(146.0.32.144)
receive(217.79.181.50)
receive(146.0.32.144)
transmit(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
transmit(85.25.195.205)
receive(85.25.195.205)
transmit(2a01:238:439c:1900::3:1)
transmit(144.76.172.53)
receive(2a01:238:439c:1900::3:1)
receive(144.76.172.53)
transmit(85.220.190.246)
transmit(2a01:4f8:120:710b::123)
transmit(2001:67c:1560:8003::c7)
receive(85.220.190.246)
receive(2a01:4f8:120:710b::123)
receive(2001:67c:1560:8003::c7)
transmit(129.250.35.250)
transmit(2a01:4f8:121:4e4:1:2:3:4)
transmit(91.189.89.199)
receive(2a01:4f8:121:4e4:1:2:3:4)
receive(91.189.89.199)
receive(129.250.35.250)
transmit(78.46.53.8)
transmit(148.251.68.100)
transmit(91.189.94.4)
receive(78.46.53.8)
receive(148.251.68.100)
receive(91.189.94.4)
transmit(195.50.171.101)
transmit(5.9.122.148)
receive(195.50.171.101)
receive(5.9.122.148)
transmit(78.46.107.140)
transmit(213.95.200.110)
receive(78.46.107.140)
receive(213.95.200.110)
transmit(148.251.84.200)
transmit(144.76.96.7)
receive(148.251.84.200)
receive(144.76.96.7)
transmit(5.189.152.108)
transmit(62.116.130.3)
receive(5.189.152.108)
receive(62.116.130.3)
transmit(217.79.181.50)
transmit(146.0.32.144)
receive(217.79.181.50)
receive(146.0.32.144)
transmit(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
transmit(85.25.195.205)
receive(2a01:4f8:200:83e9:250:56ff:fe00:4bf9)
receive(85.25.195.205)
transmit(2a01:238:439c:1900::3:1)
transmit(144.76.172.53)
receive(2a01:238:439c:1900::3:1)
receive(144.76.172.53)
transmit(2a01:4f8:120:710b::123)
transmit(2001:67c:1560:8003::c7)
receive(2a01:4f8:120:710b::123)
receive(2001:67c:1560:8003::c7)
transmit(2a01:4f8:121:4e4:1:2:3:4)
transmit(91.189.89.199)
receive(2a01:4f8:121:4e4:1:2:3:4)
receive(91.189.89.199)
transmit(148.251.68.100)
transmit(91.189.94.4)
receive(148.251.68.100)
receive(91.189.94.4)
transmit(5.9.122.148)
receive(5.9.122.148)
transmit(213.95.200.110)
receive(213.95.200.110)
transmit(144.76.96.7)
receive(144.76.96.7)
transmit(62.116.130.3)
receive(62.116.130.3)
transmit(146.0.32.144)
receive(146.0.32.144)
transmit(85.25.195.205)
receive(85.25.195.205)
transmit(144.76.172.53)
receive(144.76.172.53)
transmit(2001:67c:1560:8003::c7)
receive(2001:67c:1560:8003::c7)
transmit(91.189.89.199)
receive(91.189.89.199)
transmit(91.189.94.4)
receive(91.189.94.4)
server 85.220.190.246, port 123
stratum 2, precision -22, leap 00, trust 000
refid [85.220.190.246], delay 0.05002, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268987.31bbe7e5  Tue, Jul  5 2016 21:31:19.194
originate timestamp: db268be4.6732266d  Tue, Jul  5 2016 21:41:24.403
transmit timestamp:  f039422e.c220cd36  Sat, Sep 18 2027 21:25:34.758
filter delay:  0.05061  0.05026  0.05017  0.05002
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05002, dispersion 0.00000
offset -353547850.367451

server 129.250.35.250, port 123
stratum 2, precision -20, leap 00, trust 000
refid [129.250.35.250], delay 0.06325, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268bc9.9d9a2f66  Tue, Jul  5 2016 21:40:57.615
originate timestamp: db268be4.989e8255  Tue, Jul  5 2016 21:41:24.596
transmit timestamp:  f039422e.f554a6e5  Sat, Sep 18 2027 21:25:34.958
filter delay:  0.06454  0.06355  0.06343  0.06325
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.06325, dispersion 0.00000
offset -353547850.380999

server 78.46.53.8, port 123
stratum 2, precision -22, leap 00, trust 000
refid [78.46.53.8], delay 0.05414, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268a69.1c1df7dc  Tue, Jul  5 2016 21:35:05.109
originate timestamp: db268be4.cd7fa34f  Tue, Jul  5 2016 21:41:24.802
transmit timestamp:  f039422f.28872495  Sat, Sep 18 2027 21:25:35.158
filter delay:  0.05522  0.05414  0.05426  0.05435
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05414, dispersion 0.00000
offset -353547850.370135

server 195.50.171.101, port 123
stratum 2, precision -20, leap 00, trust 000
refid [195.50.171.101], delay 0.05035, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2687f6.08c94ea4  Tue, Jul  5 2016 21:24:38.034
originate timestamp: db268be4.fff9a6d0  Tue, Jul  5 2016 21:41:24.999
transmit timestamp:  f039422f.5bba8543  Sat, Sep 18 2027 21:25:35.358
filter delay:  0.05165  0.05083  0.05075  0.05035
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05035, dispersion 0.00000
offset -353547850.370799

server 78.46.107.140, port 123
stratum 2, precision -19, leap 00, trust 000
refid [78.46.107.140], delay 0.05481, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268b5f.82006106  Tue, Jul  5 2016 21:39:11.507
originate timestamp: db268be5.344a0d9d  Tue, Jul  5 2016 21:41:25.204
transmit timestamp:  f039422f.8eedb757  Sat, Sep 18 2027 21:25:35.558
filter delay:  0.05551  0.05540  0.05481  0.05490
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05481, dispersion 0.00000
offset -353547850.368710

server 148.251.84.200, port 123
stratum 3, precision -22, leap 00, trust 000
refid [148.251.84.200], delay 0.05466, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2686f2.a75ff9a8  Tue, Jul  5 2016 21:20:18.653
originate timestamp: db268be5.6755a6bb  Tue, Jul  5 2016 21:41:25.403
transmit timestamp:  f039422f.c220c86a  Sat, Sep 18 2027 21:25:35.758
filter delay:  0.05577  0.05475  0.05466  0.05472
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05466, dispersion 0.00000
offset -353547850.369217

server 5.189.152.108, port 123
stratum 2, precision -23, leap 00, trust 000
refid [5.189.152.108], delay 0.05783, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db26868b.3179d6b0  Tue, Jul  5 2016 21:18:35.193
originate timestamp: db268be5.9a937568  Tue, Jul  5 2016 21:41:25.603
transmit timestamp:  f039422f.f5568e4a  Sat, Sep 18 2027 21:25:35.958
filter delay:  0.05873  0.05795  0.05783  0.05789
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05783, dispersion 0.00000
offset -353547850.370795

server 217.79.181.50, port 123
stratum 2, precision -21, leap 00, trust 000
refid [217.79.181.50], delay 0.05034, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268725.1943524d  Tue, Jul  5 2016 21:21:09.098
originate timestamp: db268be5.ccfa76e2  Tue, Jul  5 2016 21:41:25.800
transmit timestamp:  f0394230.28876baf  Sat, Sep 18 2027 21:25:36.158
filter delay:  0.05121  0.05045  0.05034  0.05035
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05034, dispersion 0.00000
offset -353547850.369936

server 2a01:4f8:200:83e9:250:56ff:fe00:4bf9, port 123
stratum 2, precision -22, leap 00, trust 000
refid [2a01:4f8:200:83e9:250:56ff:fe00:4bf9], delay 0.05411, dispersion 8.00000
transmitted 4, in filter 4
reference time:    db268a4c.93bfd335  Tue, Jul  5 2016 21:34:36.577
originate timestamp: db268be6.00f24104  Tue, Jul  5 2016 21:41:26.003
transmit timestamp:  f0394230.5bba9092  Sat, Sep 18 2027 21:25:36.358
filter delay:  0.05515  0.05411  0.00000  0.05487
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 0.000000 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05411, dispersion 8.00000
offset -353547850.369215

server 2a01:238:439c:1900::3:1, port 123
stratum 2, precision -20, leap 00, trust 000
refid [2a01:238:439c:1900::3:1], delay 0.04822, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2688e9.e721c6ab  Tue, Jul  5 2016 21:28:41.902
originate timestamp: db268be6.340222be  Tue, Jul  5 2016 21:41:26.203
transmit timestamp:  f0394230.8eedd7fd  Sat, Sep 18 2027 21:25:36.558
filter delay:  0.05038  0.04822  0.04825  0.04996
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.04822, dispersion 0.00000
offset -353547850.368229

server 2a01:4f8:120:710b::123, port 123
stratum 2, precision -22, leap 00, trust 000
refid [2a01:4f8:120:710b::123], delay 0.05431, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db26844c.372fdd99  Tue, Jul  5 2016 21:09:00.215
originate timestamp: db268be6.671c1721  Tue, Jul  5 2016 21:41:26.402
transmit timestamp:  f0394230.c220974f  Sat, Sep 18 2027 21:25:36.758
filter delay:  0.05560  0.05505  0.05505  0.05431
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05431, dispersion 0.00000
offset -353547850.369936

server 2a01:4f8:121:4e4:1:2:3:4, port 123
stratum 2, precision -19, leap 00, trust 000
refid [2a01:4f8:121:4e4:1:2:3:4], delay 0.05475, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268b5f.82006106  Tue, Jul  5 2016 21:39:11.507
originate timestamp: db268be6.9a9e00f6  Tue, Jul  5 2016 21:41:26.603
transmit timestamp:  f0394230.f5548ee3  Sat, Sep 18 2027 21:25:36.958
filter delay:  0.05707  0.05482  0.05487  0.05475
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05475, dispersion 0.00000
offset -353547850.368975

server 148.251.68.100, port 123
stratum 2, precision -23, leap 00, trust 000
refid [148.251.68.100], delay 0.05426, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2688a3.5d50b802  Tue, Jul  5 2016 21:27:31.364
originate timestamp: db268be6.cd54354b  Tue, Jul  5 2016 21:41:26.802
transmit timestamp:  f0394231.28879d53  Sat, Sep 18 2027 21:25:37.158
filter delay:  0.05576  0.05472  0.05466  0.05426
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05426, dispersion 0.00000
offset -353547850.370599

server 5.9.122.148, port 123
stratum 2, precision -23, leap 00, trust 000
refid [5.9.122.148], delay 0.05487, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2687f7.382e7714  Tue, Jul  5 2016 21:24:39.219
originate timestamp: db268be7.02dda381  Tue, Jul  5 2016 21:41:27.011
transmit timestamp:  f0394231.5bbab928  Sat, Sep 18 2027 21:25:37.358
filter delay:  0.05644  0.05527  0.05487  0.06091
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05487, dispersion 0.00000
offset -353547850.367615

server 213.95.200.110, port 123
stratum 2, precision -24, leap 00, trust 000
refid [213.95.200.110], delay 0.05887, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db26889d.b342aa88  Tue, Jul  5 2016 21:27:25.700
originate timestamp: db268be7.3421ecb5  Tue, Jul  5 2016 21:41:27.203
transmit timestamp:  f0394231.8eedcabc  Sat, Sep 18 2027 21:25:37.558
filter delay:  0.06035  0.05930  0.05901  0.05887
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05887, dispersion 0.00000
offset -353547850.371335

server 144.76.96.7, port 123
stratum 3, precision -22, leap 00, trust 000
refid [144.76.96.7], delay 0.05453, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db26896a.82ef2e16  Tue, Jul  5 2016 21:30:50.511
originate timestamp: db268be7.675b0665  Tue, Jul  5 2016 21:41:27.403
transmit timestamp:  f0394231.c220b8c3  Sat, Sep 18 2027 21:25:37.758
filter delay:  0.05560  0.05507  0.05473  0.05453
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05453, dispersion 0.00000
offset -353547850.369113

server 62.116.130.3, port 123
stratum 2, precision -23, leap 00, trust 000
refid [62.116.130.3], delay 0.05789, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268bbd.1949605f  Tue, Jul  5 2016 21:40:45.098
originate timestamp: db268be7.9aa7655d  Tue, Jul  5 2016 21:41:27.604
transmit timestamp:  f0394231.f55464d7  Sat, Sep 18 2027 21:25:37.958
filter delay:  0.05927  0.05823  0.05789  0.05804
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05789, dispersion 0.00000
offset -353547850.370114

server 146.0.32.144, port 123
stratum 3, precision -23, leap 00, trust 000
refid [146.0.32.144], delay 0.05066, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2689bc.e2f625ed  Tue, Jul  5 2016 21:32:12.886
originate timestamp: db268be7.cf8e0bf6  Tue, Jul  5 2016 21:41:27.810
transmit timestamp:  f0394232.28877a6e  Sat, Sep 18 2027 21:25:38.158
filter delay:  0.05180  0.05103  0.05066  0.05078
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05066, dispersion 0.00000
offset -353547850.359924

server 85.25.195.205, port 123
stratum 2, precision -22, leap 00, trust 000
refid [85.25.195.205], delay 0.06105, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268678.43f41691  Tue, Jul  5 2016 21:18:16.265
originate timestamp: db268be7.ff7e42eb  Tue, Jul  5 2016 21:41:27.998
transmit timestamp:  f0394232.5bbaa2a4  Sat, Sep 18 2027 21:25:38.358
filter delay:  0.06247  0.06146  0.06139  0.06105
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.06105, dispersion 0.00000
offset -353547850.378071

server 144.76.172.53, port 123
stratum 3, precision -23, leap 00, trust 000
refid [144.76.172.53], delay 0.05502, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2689a9.4e6b79e3  Tue, Jul  5 2016 21:31:53.306
originate timestamp: db268be8.3456c726  Tue, Jul  5 2016 21:41:28.204
transmit timestamp:  f0394232.8eedef7e  Sat, Sep 18 2027 21:25:38.558
filter delay:  0.05638  0.05536  0.05502  0.05513
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.05502, dispersion 0.00000
offset -353547850.368483

server 2001:67c:1560:8003::c7, port 123
stratum 2, precision -23, leap 00, trust 000
refid [2001:67c:1560:8003::c7], delay 0.06203, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2688ed.c69880ee  Tue, Jul  5 2016 21:28:45.775
originate timestamp: db268be8.6872924c  Tue, Jul  5 2016 21:41:28.407
transmit timestamp:  f0394232.c220d9b2  Sat, Sep 18 2027 21:25:38.758
filter delay:  0.06351  0.06258  0.06203  0.06207
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.06203, dispersion 0.00000
offset -353547850.368557

server 91.189.89.199, port 123
stratum 2, precision -23, leap 00, trust 000
refid [91.189.89.199], delay 0.06055, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db2688ed.c69880ee  Tue, Jul  5 2016 21:28:45.775
originate timestamp: db268be8.9b94c35e  Tue, Jul  5 2016 21:41:28.607
transmit timestamp:  f0394232.f5544947  Sat, Sep 18 2027 21:25:38.958
filter delay:  0.06183  0.06087  0.06055  0.06139
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.06055, dispersion 0.00000
offset -353547850.368600

server 91.189.94.4, port 123
stratum 2, precision -22, leap 00, trust 000
refid [91.189.94.4], delay 0.06114, dispersion 0.00000
transmitted 4, in filter 4
reference time:    db268abe.9c37a7d7  Tue, Jul  5 2016 21:36:30.610
originate timestamp: db268be8.cdd60117  Tue, Jul  5 2016 21:41:28.804
transmit timestamp:  f0394233.28877a3f  Sat, Sep 18 2027 21:25:39.158
filter delay:  0.06210  0.06140  0.06128  0.06114
         0.00000  0.00000  0.00000  0.00000
filter offset: -3535478 -3535478 -3535478 -3535478
         0.000000 0.000000 0.000000 0.000000
delay 0.06114, dispersion 0.00000
offset -353547850.372071

18 Sep 21:25:39 ntpdate[19992]: step time server 85.220.190.246 offset -353547850.367451 sec

The /etc/default/ntpdate is:

# The settings in this file are used by the program ntpdate-debian, but not
 # by the upstream program ntpdate.

# Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
# so you only have to keep it in one place.
NTPDATE_USE_NTP_CONF=yes

# List of NTP servers to use  (Separate multiple servers with spaces.)
# Not used if NTPDATE_USE_NTP_CONF is yes.
NTPSERVERS="ntp.ubuntu.com"

# Additional options to pass to ntpdate
NTPOPTIONS=""

The /etc/ntp.conf is:

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org

# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient

The driftfile /var/lib/ntp/ntp.drift doesn’t exist.

Is there an option (last line in /etc/default/ntpdate) for ntp like “no drift” or “no offset”?

Where is the drift (or offset) stored? Can I update it manually?


for Ulo 1:

# sudo date 070620292016.30
Mi 6. Jul 20:29:30 CEST 2016
# date
So 19. Sep 20:12:42 CEST 2027
# sudo date --set="2016-07-06 20:30:59.990"  && date --rfc-3339=ns
Mi 6. Jul 20:30:59 CEST 2016
2027-09-19 20:13:16.565104422+02:00
# date
So 19. Sep 20:13:20 CEST 2027
# ntpdate -s ntp.ubuntu.com
# date
So 19. Sep 20:13:37 CEST 2027

for Ulo 2:

# date
Mo 20. Sep 18:52:15 UTC 2027
# sudo timedatectl set-timezone UTC
# date
Mo 20. Sep 18:52:21 UTC 2027

It looks like that a service is wrongly "correcting" the date:

# sudo date --set="2016-07-06 20:30:59.700"  && date && sleep 1 && date
Mi 6. Jul 20:30:59 CEST 2016 
Mi 6. Jul 20:30:59 CEST 2016
So 19. Sep 21:06:31 CEST 2027

Which service could it be?

========================================================

Solution with a little howto

Insert in /etc/ntp.conf

tinker panic 0

Check, if this option is set in /etc/default/ntpdate:

NTPDATE_USE_NTP_CONF=yes

Check, if this option is set in /etc/default/ntp:

NTPD_OPTS='-g'

Than stop ntp and set hwclock to the actual date and time:

# sudo service ntp stop 
* Stopping NTP server ntpd                                                          [ OK ]
# sudo hwclock --set --date="7/9/16 18:37:30"
# hwclock
Sa 09 Jul 2016 18:37:34 CEST  -0.047338 Sekunden

Set the hwclock to system date/time (thanks to Michael Hampton):

# hwclock -s

Check hwclock (Bios time) and date (system time) which are still DIFFERENT:

# hwclock
Sa 09 Jul 2016 18:37:47 CEST  -0.984834 Sekunden
# date
Mi 22. Sep 00:24:34 CEST 2027

Do NOT restart ntp and WAIT for about 10 minutes. You can check with date or hwclock. The date remains wrong!:

# date
Mi 22. Sep 00:29:32 CEST 2027
# date
Mi 22. Sep 00:33:49 CEST 2027

Reboot after 10 minutes. Correct the file system because it complaint that the last file system check was in the future, something like this:

sudo fsck -v -a /dev/sda1

Correct the files in your system which are future dated. Locate a reference file reffile with the correct timestamp:

find / -cnewer /reffile | xargs touch

It runs for some time. Reboot afterwards and erverything should work.

  • 2
    You should set the correct date and time in your BIOS (either UTC or local time, depending on how your Ubuntu is configured). By the way, 1 July 2016 was definitely a Friday. – fkraiem Jul 3 '16 at 18:07
  • hwclock reads and sets the bios time. You are right 1.7.2016 is a Friday. – musbach Jul 3 '16 at 18:11
  • 1
    Are you using NTP to sync the time with a timeserver? – Henning Kockerbeck Jul 3 '16 at 21:51
  • Yes I tink so. I am using the standard configuration of Ubuntu 14.04 and I didn't change anything. – musbach Jul 4 '16 at 13:44
  • 1
    Then the problem might be that your changes get "re-adjusted" to what the time server "thinks" is correct. Are we talking about a desktop or server machine (GUI or not)? Did you select the correct location/time zone when you installed it? Is one or both of the packages 'ntpdate' or 'ntp' installed? – Henning Kockerbeck Jul 4 '16 at 18:03
0

Many ways.. for instance

 sudo date MMDDhhmmyyyy.ss
 # sudo date 02021411971.59

or you can do it this way

 sudo date --set="2016-07-02 13:12:59.990"  && date --rfc-3339=ns

or you can simplysynchronize like this

ntpdate -s ntp.ubuntu.com

and finally change the timezone like this

sudo dpkg-reconfigure tzdata

Got it from here & Happy Time Setting

  • Nothing works. Please have look in the original question. – musbach Jul 6 '16 at 18:35
  • have you tried changing the timezone.. sudo timedatectl set-timezone UTC – Olu Smith Jul 6 '16 at 19:04
  • Please see above. It dosen't work. – musbach Jul 7 '16 at 19:13
2

If you're synchronizing your local time to a timeserver with NTP, the problem might be that your changes get "re-adjusted" to what the time server "thinks" is correct.

Check the date and time setting in your GUI, for KDE that should be System Settings/Date & Time. Maybe you're using a time server that's somehow "off", and choosing another one might solve your problem. Also check if the time zone settings are correct.

Additionally, you can use

ntpdate -d

on the command line to get some debugging information. ntpdate is a command line ntp client. The -d switch activates the debugging mode. In that mode, ntpdate will fetch the information from the server, but not adjust the local time. Additionally, it will print useful information for general debugging. If ntpdate -d tells you that not servers can be used, but there should be at least one (e. g. defined in the GUI), try ntpdate-debian -d. Not sure why there are two binaries, but the latter works in Ubuntu, not sure about Kubuntu.

ntp is a time server daemon. The idea behind using it on a (not specific NTP-)server is expressed well in the Ubuntu documentation:

The ntp daemon ntpd calculates the drift of your system clock and continuously adjusts it, so there are no large corrections that could lead to inconsistent logs for instance. The cost is a little processing power and memory, but for a modern server this is negligible.

In your case you should consider it mostly because depending on the configuration of ntpdate, it might use ntps lists of available time servers instead of its own (see NTPDATE_USE_NTP_CONF in /etc/default/ntpdate).

With this information, you should be able to poke around and find out what's happening, if your problem is NTP related.

  • The time is read correctly but ntp adds always an offset of 10 years on top. – musbach Jul 9 '16 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.