Internet Direct (Indy) Version 9.0.1 Beta
TIdSNTP.DateTime
Date and time returned for the client

property DateTime: TDateTime;
Description
DateTime is a read-only TDateTime property used to store the date and time value retrieved using the SNTP client.

The value in DateTime is read using the protected function GetDateTime. GetDateTime creates an TNTPGram datagram , transmits the datagram as a string containing the unicast SNTP request using Send, and retrieves the response using ReceiveString. If the response is not an empty string, TIdSNTP properties are updated with values in the response.

The value of DateTime can be 0.0 when the NTP datagram response is either an empty string or ignored based on values in LeapIndicator, Stratum, or TransmitTimestamp fields of the response TNTPGram.

Reading the value of DateTime does not affect the clock on the local computer. SyncTime reads DateTime prior to updating the clock on the local computer.