BasvanH / habpanel-widget-openweathermap

OpenWeatherMap widget for HABPanel (OpenHAB)
12 stars 41 forks source link

Fix duplicate day issue #10

Closed mb300sd closed 4 years ago

mb300sd commented 4 years ago

This calculates the number of hours to the next day at noon, and then adds 24*day for the next 3 days. I'm not exactly sure where the original code is going wrong, but we can avoid doing math on Date objects completely since we only care about the number of hours until the next day at noon.

BasvanH commented 4 years ago

Much cleaner approach, thanks!