Running on a RasPI 4 with openHABian and openHAB 3.0.0 (upgraded from 2.5.11-1)
Log shows: [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘natur-7’ failed: ‘millis’ is not a member of ‘java.time.ZonedDateTime’
The corresponding line in my rule file is: val timeSinceLast = now.millis - VMaxWindKurz.lastUpdate("mapdb").millis
I read the topic DateTime Conversion (openHAB 3.x) and understood that now JAVA Time is used instead of former Jodatime but unfortunately that didn’t help me further
Thanks… According to the generated graph my corrected code val timeSinceLast = now.toInstant().toEpochMilli() - VMaxWindKurz.lastUpdate(“mapdb”).toInstant().toEpochMilli()
is working.
But I ran at once into the next time problem with the expression now.withTimeAtStartOfDay in: val Number tKorrMax = (Temp_Aussen_Korrigiert.maximumSince(now.withTimeAtStartOfDay).state as DecimalType)
and resulting error ‘withTimeAtStartOfDay’ is not a member of ‘java.time.ZonedDateTime’
So do you have a hint for that and for further problems a hint for a website where the JAVA time “now” and all the other stuff like withTimeAtStartOfDay is listed? Because the pages I found didn´t help me in a “usable” mannor…