I would try with this simple :
set fileFolder to (choose folder)
tell application "System Events"
set hfsPaths to path of files of fileFolder
repeat with aPath in hfsPaths
set theName to name of disk item aPath --> your name "2018/12/18 11.30.27.png" is returned as "2018:12:18 11.30.27.png"
set dateComponents to my splittext(theName, {":", " ", "."})
--> {"2018", "12", "18", "", "11", "30", "27", "png"}
set newDate to date ("1 / 1 / 1")
tell newDate
set year to dateComponents's item 1
set day to dateComponents's item 3
set its month to dateComponents's item 2
set its hours to dateComponents's item 5 # ADDED its
set its minutes to dateComponents's item 6 # ADDED its
set its seconds to dateComponents's item 7
end tell
set modification date of file aPath to newDate
end repeat
end tell
on splittext(theText, theDelimiter)
set AppleScript's text item delimiters to theDelimiter
set theTextItems to every text item of theText
set AppleScript's text item delimiters to ""
return theTextItems
end splittext
Alternate syntax :
set fileFolder to (choose folder)
tell application "System Events"
set hfsPaths to path of files of fileFolder
repeat with aPath in hfsPaths
set theName to name of disk item aPath --> your name "2018/12/18 11.30.27.png" is returned as "2018:12:18 11.30.27.png"
set {theYear, theMonth, theDay, bof, theHours, theMinutes, theSeconds} to my splittext(theName, {":", " ", "."})
--> {"2018", "12", "18", "", "11", "30", "27"}
set newDate to date ("1 / 1 / 1")
tell newDate
set {year, day, its month, its hours, its minutes, its seconds} to {theYear, theDay, theMonth, theHours, theMinutes, theSeconds}
end tell
set modification date of file aPath to newDate
end repeat
end tell
on splittext(theText, theDelimiter)
set AppleScript's text item delimiters to theDelimiter
set theTextItems to every text item of theText
set AppleScript's text item delimiters to ""
return theTextItems
end splittext
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) dimanche 24 mars 2019 22:38:21