alda1
(Alex Needle)
March 15, 2025, 8:03am
1
In the rule I want increase a time about 4hours and then transfer into item (type DateTime). This item (time) I want use for start of any other rule in specific time:
I tired this :
val ZonedDateTime zdt = ZonedDateTime.now().plusHours(4)
postUpdate(myItem, zdt)
but it doesn’t work. myItem isn’t updated
See this topic:
zdt
here is of type Java Time, so you have to use
val DateTimeType myDateTimeType = new DateTimeType(zdt) // conversion
alda1
(Alex Needle)
March 15, 2025, 10:23am
3
This works:
val ZonedDateTime zdt = ZonedDateTime.now().plusHours(4)
val DateTimeType myDateTimeType = new DateTimeType(zdt)
postUpdate(myItem, myDateTimeType)