Post by JJPost by Saucer ManI'm looking to set the system time back a certain number of hours.
Would anyone know how to do that in a batch file?
Yes, but it'll depend on your date and time format.
Check this. It is not depending on date and time format
:: Example of using the function
@ECHO OFF & SETLOCAL
CALL :GetLocalDateTime CurrentTime
ECHO Current date and time is [%CurrentTime%]
ENDLOCAL & EXIT /B 0
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Return local date and time with format 'yyyymmddhhmmss.ffffff+mmm'.
::
:: Rear '+mmm' is the UTC time offsets in minutes.
::
:GetLocalDateTime {Return_variable}
FOR /F "tokens=1* delims==" %%a IN ('wmic OS GET LocalDateTime /VALUE ^| find "="') DO SET "%~1=%%b"
EXIT /B 0
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::