Here’s the code change to make this OH 2.x uptime rule work on post (Show openHAB uptime - #4 by johfeu) with OH 3.x.
var tmpNow = new DateTimeType(now().plusDays(0))
logInfo("OHUpTime", "tmpNow variable is " + tmpNow)
val Number item_millis = (tmpNow as DateTimeType).zonedDateTime.toInstant.toEpochMilli
logInfo("OHUpTime", "item_millis variable is " + item_millis)
val Number now_millis = now.toInstant.toEpochMilli
logInfo("OHUpTime", "now_millis variable is " + now_millis)
var Number diff = (now_millis - item_millis)/60000
logInfo("OHUpTime", "diff variable is " + diff)
Best, Jay