Where DTT_time is oh DateTime (item with state).
and JDT_time is Joda Date Time
Right?
Thanks for the explanation (still confusing with the imilar names though
So getting back to my original problem (requesting persisted data for a specific point in time) I need to check the historicState with a Joda time like suggested by @vzorglub:
// get historic state at TripEnd time
val dt_carEndTime = new DateTime(CarTripEnd.state.toString)
val Number distDNAEnd = CarDistDNA.historicState(dt_carEndTime)
// log historic state at TripEnd time
logInfo("car_state.rules", "distDNAEnd |||" + distDNAEnd + "<")
Error during the execution of rule 'Received car trip data': 'state' is not a member of 'org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate$1'
YEAH!
I possibly got it - this works:
val dt_carEndTime = new DateTime(CarTripEnd.state.toString)
val String distDNAEnd = CarDistDNA.historicState(dt_carEndTime).state.toString