Merge pull request #235 from lbredeso/button-controller-dst-fix

SHARD-211: DST fix for Button Controller
This commit is contained in:
Luke Bredeson
2016-05-13 10:20:59 -05:00

View File

@@ -297,8 +297,8 @@ private getTimeOk() {
def result = true def result = true
if (starting && ending) { if (starting && ending) {
def currTime = now() def currTime = now()
def start = timeToday(starting).time def start = timeToday(starting, location.timeZone).time
def stop = timeToday(ending).time def stop = timeToday(ending, location.timeZone).time
result = start < stop ? currTime >= start && currTime <= stop : currTime <= stop || currTime >= start result = start < stop ? currTime >= start && currTime <= stop : currTime <= stop || currTime >= start
} }
log.trace "timeOk = $result" log.trace "timeOk = $result"