我正在尝试将我的 centos 虚拟机的日期设置为 1 个月前的日期以进行某些许可证验证,因为我已禁用 systemd-timesyncd
ntpd 服务,但在将时间设置为 -32 天后,系统 dbus 服务仍将其重置为当前时间
Nov 5 18:16:27 dev-sunset-racer-2 systemd: Time has been changed
Nov 5 18:16:27 dev-sunset-racer-2 systemd-timedated: Changed local time to Thu Nov 5 18:16:27 2020
Nov 5 18:17:17 dev-sunset-racer-2 dbus[3105]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Dec 7 18:17:24 dev-sunset-racer-2 systemd: Time has been changed
Dec 7 18:17:43 dev-sunset-racer-2 dbus[3105]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Dec 7 18:20:01 dev-sunset-racer-2 dbus[3105]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Dec 7 18:20:26 dev-sunset-racer-2 dbus[3105]: [system] Failed to activate service 'org.freedesktop.login1': timed out
有什么建议如何克服这个问题吗?
使用的命令:
sudo systemctl disable systemd-timesyncd
sudo systemctl stop ntpd
sudo systemctl disable ntpd
sudo timedatectl set-time -- '-32 days'