Topic Path: Symbol Reference > Classes > TIdSNTP Class > TIdSNTP Properties > DateTime Property
TIdSNTP.DateTime Property

Date and time returned from the SNTP server.

property DateTime: TDateTime;

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, and retrieves the SNTP response. If the response is not an empty string, TIdSNTP properties are updated with values in the response. 

The value in 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 settings on the local computer. 

Use SyncTime to read the value for DateTime and to apply the value to the clock on the local computer.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.