mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-03 22:04:41 +01:00
Merge pull request #235 from lbredeso/button-controller-dst-fix
SHARD-211: DST fix for Button Controller
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user