I'm grabbing the name of a file, which is the date and time, and setting it to the modified date. The problem is it is the date gets set properly but the time doesn't...it's off by -1hr, and I'm verifying it beforehand.
The input format varies as 2022-02-02_083224_P.jpg ----- YYYY-MM-DD_HHMMSS
Func _Set_File_Dates($sFileSelect)
$aDirContent_New = StringSplit($sFileSelect, "|", 2)
For $i = UBound($aDirContent_New) - 1 to 0 Step - 1
$FileNameDate = StringSplit($aDirContent_New[$i], "\", 2)
$aFileNameDate = StringSplit($FileNameDate[UBound($FileNameDate)-1], "_", 2)
$NewTime = $aFileNameDate[0] & $aFileNameDate[1]
$NewTime = StringRegExp($NewTime, "\d+", 3)
_ArrayDisplay($NewTime)
$NewTime = $NewTime[0] & $NewTime[1] & $NewTime[2]
MsgBox(0,"new date", $NewTime)
FileSetTime ( $aDirContent_New[$i], $NewTime, $FT_MODIFIED)
Next
;Exit
EndFunc
Any help?