Set the local system clock to the specified date and time.
This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. to get extended error information, check the value of the LastError property.
The SetTime method updates the local system clock to the the date and time returned by the time server. The user must have the appropriate privileges to change the system clock, otherwise an error will be returned. This typically requires the application to execute with elevated privileges.
Because Windows systems are usually configured to automatically synchronize the system clock with a time server using the Windows Time service (W32Time), most applications should not use this method.
The network time must be expressed as the number of seconds elapsed since midnight, January 1, 1900 UTC.
NetworkTime Class | SocketTools Namespace | NetworkTime.SetTime Overload List