Update the system clock from the console

mehmethanifi

Well-Known Member
Dec 15, 2016
60
4
48
38
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??
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!