Update the system clock from the console

mehmethanifi

Renowned Member
Dec 15, 2016
61
4
73
39
Hi,

How can I update the system clock?

When I use this command (date --set "23 Dec 2016 15:17:00"),
The command output gives the correct time. But When I use date command, I see that history is like the old one.
Some Output;
root@server02:/etc/pve# cat /etc/timezone
Etc/GMT+3
*************
cat /etc/systemd/timesyncd.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# See timesyncd.conf(5) for details

[Time]
#server 0.tr.pool.ntp.org 1.tr.pool.ntp.org 2.tr.pool.ntp.org 3.tr.pool.ntp.org
root@server02:~#

I wish you help this issue,
Thanks.
 
Is the syncservice running? Systemd haven't ntp anymore. It uses his own services. So at systemboot the time will be set with
Code:
systemctl status systemd-timedated.service (static service)
After that the sync is running with:
Code:
systemctl status systemd-timesyncd.service (should running without errors)
If you have the wrong timezone you can change it with:
Code:
dpkg-reconfigure tzdata
You can also use the old ntpservice.
Code:
apt install ntp
 
I had a similer problem with one of my nodes. Same error. i found the system date and time were wrong. Once I fixed it the problem resolved itself. This is on a complete 7.0 install on multiple nodes. . I had this problem before I wiped my disks and installed 7.0 , If I loose time again I will try to replace my cmos battery??