projects
/
smartapps.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update turn-on-before-sunset.groovy
[smartapps.git]
/
official
/
turn-on-before-sunset.groovy
diff --git
a/official/turn-on-before-sunset.groovy
b/official/turn-on-before-sunset.groovy
index a4ed25c477bccc424a44f98fdd6f370588e8a432..1c8a5db1bf1e1cc0933be44715659aa7b1437e58 100644
(file)
--- a/
official/turn-on-before-sunset.groovy
+++ b/
official/turn-on-before-sunset.groovy
@@
-53,15
+53,15
@@
def sunsetTimeHandler(evt) {
def scheduleTurnOn(sunsetString) {
//get the Date value for the string
def scheduleTurnOn(sunsetString) {
//get the Date value for the string
- def sunsetTime = Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", sunsetString)
+
//
def sunsetTime = Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", sunsetString)
//calculate the offset
//calculate the offset
-
def timeBeforeSunset = new Date(sunsetTime.time - (offset * 60 * 1000)
)
+
//def timeBeforeSunset = new Date(
)
-
log.debug "Scheduling for: $timeBeforeSunset (sunset is $sunsetTime)
"
+
//log.debug "Scheduling for: $timeBeforeSunset
"
//schedule this to run one time
//schedule this to run one time
- runOnce(
timeBeforeSunset
, turnOn)
+ runOnce(
"someTime"
, turnOn)
}
def turnOn() {
}
def turnOn() {