Adding an NTP
Service
The
HostConfigManager.dateTimeSystem
property contains a
HostDateTimeSystem
data object.
This object allows you to perform NTP and date and time related configuration.
- Query and update the date and time information by using one of the methods defined inHostDateTimeSystem.
- Modify theHostDateTimeSystem.dateTimeInfoproperty, which contains aHostDateTimeInfoobject, to set up NTP. The NTP information is stored in theHostDateTimeInfo.ntpConfigproperty, which is aHostNtpConfigobject. TheHostNtpConfigobjects’sserverproperty contains a list of time servers, specified by IP address or fully qualified domain name.You can start and stop the NTP daemon and retrieve information about it by using theHostServiceSystemobject.