# Managed Object - HostDateTimeSystem(vim.host.DateTimeSystem)

Property of
  HostConfigManager
See also
  HostDateTimeConfig, HostDateTimeInfo, HostDateTimeSystemServiceTestResult, HostDateTimeSystemTimeZone
Since
  VI API 2.5

## Managed Object Description

This managed object provides for NTP and date/time related configuration on a host. Information regarding the running status of the NTP daemon and functionality to start and stop the daemon is provided by the HostServiceSystem object.

Properties

Name | Type | Description
--- | --- | ---
dateTimeInfo P | HostDateTimeInfo | The DateTime configuration of the host.

P Required privilege: System.Read

Methods

Methods defined in this Managed Object
QueryAvailableTimeZones, QueryDateTime, RefreshDateTimeSystem, TestTimeService, UpdateDateTime, UpdateDateTimeConfig

# QueryAvailableTimeZones(queryAvailableTimeZones)

Retrieves the list of available timezones on the host. The API works off the public domain 'tz' timezone database.

Required Privileges
  System.Read

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDateTimeSystem used to make the method call.

Return Value

Type | Description
--- | ---
HostDateTimeSystemTimeZone[] | List of available timezones on the host.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryAvailableTimeZones" type="vsan:QueryAvailableTimeZonesRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryAvailableTimeZonesResponse"> <complexType> <sequence> <element name="returnval" type="vsan:HostDateTimeSystemTimeZone" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryDateTime(queryDateTime)

Get the current DateTime on the host.

Required Privileges
  System.Read

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDateTimeSystem used to make the method call.

Return Value

Type | Description
--- | ---
xsd:dateTime | Current DateTime on the host.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDateTime" type="vsan:QueryDateTimeRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDateTimeResponse"> <complexType> <sequence> <element name="returnval" type="xsd:dateTime"/> </sequence> </complexType> </element>

# RefreshDateTimeSystem(refresh)

Refresh the DateTime related settings to pick up any changes that might have occurred.

Required Privileges
  Host.Config.DateTime

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDateTimeSystem used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="RefreshDateTimeSystem" type="vsan:RefreshDateTimeSystemRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="RefreshDateTimeSystemResponse"> <complexType/> </element>

# TestTimeService(testTimeService)

Run a test to validate current time service configuration is functioning normally. The report will provide a localized diagnostic of any issues. Only one diagnostic test may be running at a time.

Required Privileges
  Host.Config.DateTime
Since
  vSphere API 7.0.3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDateTimeSystem used to make the method call.

Return Value

Type | Description
--- | ---
HostDateTimeSystemServiceTestResult | The status of the time service on this host based on present time service configuration.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="TestTimeService" type="vsan:TestTimeServiceRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="TestTimeServiceResponse"> <complexType> <sequence> <element name="returnval" type="vsan:HostDateTimeSystemServiceTestResult" minOccurs="0"/> </sequence> </complexType> </element>

# UpdateDateTime(updateDateTime)

Update the date/time on the host. This method should be used with caution since network delays, execution delays can result in time skews.

Required Privileges
  Host.Config.DateTime

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDateTimeSystem used to make the method call.
dateTime P | xsd:dateTime | DateTime to update the host to. Since VI API 2.5

P Required privilege: dateTime

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if an error occurs.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UpdateDateTime" type="vsan:UpdateDateTimeRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UpdateDateTimeResponse"> <complexType/> </element>

# UpdateDateTimeConfig(updateConfig)

Update the DateTime configuration of the host.

Required Privileges
  Host.Config.DateTime

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDateTimeSystem used to make the method call.
config P | HostDateTimeConfig | The new DateTime configuration information. Since VI API 2.5

P Required privilege: config

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if an error occurs.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UpdateDateTimeConfig" type="vsan:UpdateDateTimeConfigRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UpdateDateTimeConfigResponse"> <complexType/> </element>