Passing a time variable from KM into applescript and carrying out date math within the script

Hello,

I'm trying ammend a script to schedule tasks into my calendar from omnifocus. I want to be able to pass the time I want to begin working into the script. As it is, the script returns the error: 'Can’t make "1708596013" into type date'

My understanding was the both KM and AS work using ISO dates? Is there a way of formatting the time so that the script will accept itand then be able to carry out math on it? Thanks for your help.

Sorry - the screenshot doesn't havethe first part of the script in: