Hi - total n00b just getting started so please be gentle Have one smart light that works great, had it turning on/off at sunset/sunrise using the canned app.
Wanting to learn SmartApps and groovy, created a copy of this: http://docs.smartthings.com/en/latest/smartapp-developers-guide/sunset-and-sunrise.html basically verbatim - but it’s confusing UTC and EDT somehow? I know Time/Dates can be very difficult.
I have this from the guide:
def sunsetTime = Date.parse(“yyyy-MM-dd’T’HH:mm:ss.SSS’Z’”, sunsetString)
but have this for the device smartApp:
Scheduled Jobs Handler: turnOn Next Run Time: 2015-08-27 12:06:00 AM EDT <-- should be 2015-08-26 08:06 PM EDT, or 12:06AM UTC
Following the groovy docs, looks like Z isn’t zulu (UTC) time but RFC822, or:
“yyyy-MM-dd’T’HH:mm:ss.SSSZ” (example) 2001-07-04T12:08:56.235-0700
My time zone is correctly set for America/New_York