Hi Hector,
It seems that the hour as set in the text box is not being converted correctly. I set the structure member as follows,
rcall GetWindowText,hHour,pbuf,64
mov rax, uval(pbuf)
mov stm.wHour, ax
Then follow it with,
invoke SystemTimeToFileTime,pstm,pftm
rcall SleepEx,256,0 ; needs to have this delay
invoke SetFileTime,hFile,pftm,pftm,pftm
Perhaps the API SystemTimeToFileTime is broken.