Error: 'timeInMillis' is not a member of 'java.time.ZonedDateTime'

The docs should be updated and I’m in favor of the approach I showed.

To correct your original error the proper way is

val joda_LastOpen= new DateTime((Door_LastOpen.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli

The docs should be updated to show both really.

1 Like