$sunrise and $nextsunrise wrong times

Hi there,

I am looking at something I think is wrong in webcore.

In several pistons I am using the $sunrise, $sunset, $nextsunrise, $nextsunset. The issue I found is when I compare the today’s current $sunrise and $nextsunrise values for my location, these are the following :

  • $sunrise : 15/03/2018 at 07:16:00
  • $nextSunrise : 16/03/2018 at 07:16:00

But in the IDE, it is clearly written the the next sunrise will occur at 7:14:00 on the 16th, and not again at 7:16:00. And I can vouch for that, as I know that in March we get about 2 minutes more of sun both at sunrise and at sunset.

Several questions here :

  • Is it normal that the $nextsunrise time value is the same as the today’s $sunrise time value ?
  • If so, will it update automatically at midnight ? And in this case both $sunrise and $nextsunrise will move to 7:14:00 ?
  • And again if so, what will happen with my pistons ? For now their next scheduled time for sunrise is 7:16:00 on the 16th. Will it also change at midnight automatically to become 7:14:00 ?

Thank you in advance.

For those interested in the matter :

Today my sunrise related pistons used the yesterday’s sunrise time (7:16 like yesterday instead of 7:14 for today). And now my Sunrise pistons for tomorrow are planned at 7:14. We therefore have a 1-day shift in the sunrise time when using WebCore. This may not be a huge issue for 363 days out of 365, as the shift is only a few minutes, but twice a year it will be an issue when changing time because of the daylight saving time.

I will add a blank action to reset the timer at midnight, as the sunrise time seems to update automatically at midnight.

However, FYI, ST does provide the information of tomorrow’s sunrise, and we can find it in the IDE : My Locations (in the top left corner) -> smartapps (in the table, not in the links at top) -> Weather Station -> Scheduled Jobs -> Sunrise Handler.
To be noted that the Sunrise Handler provides the sunrise time for the next sunrise, not necessarly for tomorrow. But if you wait for today’s sunrise to occur, it will then display the tomorrow’s sunrise time. I think that webcore should also be able to update it based on this.