|
Set the local system clock to the value returned by the network
time server.
Syntax
object.SetTime( [NetworkTime] )
Parameters
- NetworkTime
- An optional date value which specifies the new system time. If
this is passed as a string, it will be parsed according to the
local system settings; if the string is not in a recognizable
format, the method will return an error. Note that the string must
specify the full date and time, not simply a time value. If this
argument is omitted, the date and time value last returned from a
call to the GetTime method will be used. This enables an
application to synchronize the local system time with the time
returned by the server.
Return Value
A boolean value of true is returned if the operation was
successful, otherwise the method will return false. Check the value
of the LastError property to determine the cause of the
failure.
Remarks
The SetTime method causes the control to update the local
system's clock to the specified date and time. It is required that
the user have the appropriate privileges required to change the
system clock, otherwise an error will be returned.
See Also
LocalDate Property,
LocalTime Property,
SystemDate Property,
SystemTime Property,
GetTime Method
|
|