Function Reference


_SetTime

Sets the current time of the system

#include <Date.au3>
_SetTime ( $iHour, $iMinute [, $iSecond = 0 [, $iMSeconds = 0]] )

Parameters

$iHour the hour. Values: 0-23
$iMinute the minute. Values: 0-59
$iSecond [optional] the seconds. Values: 0-59
$iMSeconds [optional] the milliseconds. Values: 0-999

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero.
@error: 1 - Failure
@extended: _WinAPI_GetLastError()
Error code(s): MSDN: ms681381.aspx

Remarks

If the optional parameters ($iSecond and iMSeconds) are not defined, the function will not change the current value.

Related

_SetDate

See Also

Search GetLastError in MSDN Library.

Example

#include <Date.au3>

_SetTime(20, 15) ; Set time to 20:15
_SetTime(20, 15, 30) ; Set time to 20:15:30