diff --git a/CHANGELOG.md b/CHANGELOG.md index d6584d0e..6356300d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Finnish translation for "PRECIP", "UPDATE_INFO_MULTIPLE" and "UPDATE_INFO_SINGLE". - Added the ability to hide the temp label and weather icon in the `currentweather` module to allow showing only information such as wind and sunset/rise. -- Sun and Moon data to the `clock` module. +- The `clock` module now optionally displays sun and moon data, including rise/set times, remaining daylight, and percent of moon illumination. ### Fixed - Force declaration of public ip adress in config file (ISSUE #1852) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index e6ac880b..96c31143 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -167,7 +167,7 @@ Module.register("clock",{ } else if (now.isBefore(sunTimes.sunset)) { nextEvent = sunTimes.sunset; } else { - const tomorrowSunTimes = SunCalc.getTimes(now.add(1, 'day'), this.config.lat, this.config.lon); + const tomorrowSunTimes = SunCalc.getTimes(now.clone().add(1, 'day'), this.config.lat, this.config.lon); nextEvent = tomorrowSunTimes.sunrise; } const untilNextEvent = moment.duration(moment(nextEvent).diff(now));