You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add host.get_ntp_synchronized and host.set_servertime (#6743)
**host.get_ntp_synchronized**:
Simply return true or false by parsing "System clock synchronized" or
"NTP synchronized" from the output of "timedatectl status" like the
following, no matter the NTP being enabled or not.
```
# timedatectl status
Local time: Wed 2025-11-05 06:10:42 UTC
Universal time: Wed 2025-11-05 06:10:42 UTC
RTC time: Wed 2025-11-05 05:00:11
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
```
**host.set_servertime**:
Use "timedatectl set-time" to set local time on the host in its local
timezone only when NTP is disabled.
0 commit comments