Date text cannot be parsed to a Duration in irriggation rule:y

Error:
Script execution of rule with UID ‘irriggation-6’ failed: Text cannot be parsed to a Duration in irriggation

rule:

var NowMonth = String::format("%02d", now.getMonthValue())
var NowDay = String::format("%02d", now.getDayOfMonth())

 val userStartTime = parse(now.getYear() + "-" + NowMonth + "-" + NowDay + "T" + WtrStartTime.state + ":00.000+02:00").withZoneSameInstant(ZoneId.systemDefault())

where WtrStartTime.state is “08:00”

val userStartTime = parse(now.getYear() + "-" + NowMonth + "-" + NowDay + "T" + "08:00:00.000+02:00").withZoneSameInstant(ZoneId.systemDefault())

The same problem don’t know how to solve this

Show the entire rule.

This looks a whole lot like an XY Problem. If you are just trying to convert to an hour of day why not use something more straight forward like

val userStartTime = now.withHour(WtrStartTime.state.intValue).withMinute(0).withSecond(0).withNano(0)

No need to convert stuff to an ISO8601 string and back again, no need to mess with the timezone, and it makes a lot more sense what the line means.