Set future time for DateTime item with rule (text or blockly)

Unfortunately that will break on DST changeovers and tomorrow the time will be one hour off.

now.plusDays(1).withHours(6).withMinutes(0).withSeconds(0).withNanos(0)

should handle that transition better.

Note, look up the method names on ZonedDateTime, I’m going from memory here and it might be slightly different (e.g. withMinuteOfHour, withMinute, etc).

See Working with Date Times in JS Scripting (ECMAScript 11).

1 Like