My computer clock is always about 6 minutes off, and when I reset it goes back eventually. I created a script that would set the clock for me, so I wouldn't have to keep setting it by hand, but the hour gets set to about five hours earlier. If @HOUR + 5 is greater than 23, it doesn't set the clock at all. What am I doing wrong?
#include <Date.au3>
$tCur = _Date_Time_GetSystemTime()
$min = @MIN + 6
$hour = @HOUR
if $min > 59 Then
$min = $min - 59
$hour = $hour + 1
EndIf
$tNew = _Date_Time_EncodeSystemTime(@MON, @MDAY, @YEAR, $hour, $min, @SEC, @MSEC)
_Date_Time_SetSystemTime(DllStructGetPtr($tNew))