Get the current date and time from the specified time server.
This method returns a System.DateTime value which specifies the date and time provided by the server. If the method fails, the return value is System.DateTime.MinValue. To get extended error information, check the value of the LastError property.
Time servers are commonly maintained by governments and universities. If you are unable to obtain the time from a server, contact the system administrator to determine if they have the standard time service available on port 37 or 123.
In the United States, the National Institute of Standards and Technology (NIST) hosts public servers which can be used to obtain the current time. It is recommended most applications use time.nist.gov as the server. Public servers should not be queried frequently and may block multiple requests issued over a short period of time.
NetworkTime Class | SocketTools Namespace | NetworkTime.GetTime Overload List