This morning I noticed that some light was turned on unexpectedly. The light was controlled by my custom app, it worked in the past for a long time without issue, and I didn't make any changes to hubitat yesterday. So I debugged it a bit and found that it might be a bug that also affects any apps using the getSunriseAndSunset function.
Here's the debugging code that simply logs the current sunset, sunrise & now:
The actual log is: Sunrise: Thu May 21 05:54:00 PDT 2020, Sunset: Thu May 21 20:16:00 PDT 2020, Now: Fri May 22 09:18:46 PDT 2020
You may have noticed that both sunset & sunrise is for yesterday.
This triggers time check like "from sunset to 10PM" because it's translated to "from sunset yesterday to 10PM today".
The system events for sunset/sunrise:
I then created a simple automation test rule to see if this bug affected to other app, and it did. The SA rule have time restriction "From sunset to 10PM":
It was then triggered @9:25AM:
As this happens only today but not yesterday, and I didn't make any change, I suspect the bug may go away if I reboot the hub, but it might be useful for debugging not to reboot for now if any further information is needed. The last systemStart event is at 2020-05-16 06:47:37.475 PM PDT