From 91c01dc643afb2c35894ec67af810ef3dccdd7fc Mon Sep 17 00:00:00 2001 From: Luke Bredeson Date: Thu, 29 Oct 2015 12:35:28 -0500 Subject: [PATCH] DST fix for Button Controller --- .../button-controller.src/button-controller.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smartapps/smartthings/button-controller.src/button-controller.groovy b/smartapps/smartthings/button-controller.src/button-controller.groovy index 1f99b08..d03551b 100644 --- a/smartapps/smartthings/button-controller.src/button-controller.groovy +++ b/smartapps/smartthings/button-controller.src/button-controller.groovy @@ -294,8 +294,8 @@ private getTimeOk() { def result = true if (starting && ending) { def currTime = now() - def start = timeToday(starting).time - def stop = timeToday(ending).time + def start = timeToday(starting, location.timeZone).time + def stop = timeToday(ending, location.timeZone).time result = start < stop ? currTime >= start && currTime <= stop : currTime <= stop || currTime >= start } log.trace "timeOk = $result"