I would like my device handler to report the last time it was refreshed. I tried this code to get current time:
def dateTime = new Date()
def now = dateTime.format("HH:mm", location.timeZone)
log.debug now
and get a null pointer
As well as
def start = timeToday("HH:mm", location.timeZone)
which says
java.lang.IllegalArgumentException: TimeZone not found in time input string or provided as a second parameter.