mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Convert moment(..., "X") to moment.unix(...) (#2950)
because I thought it was more readable and I found a little bug when calculatin suntimes on the way.... Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -143,8 +143,8 @@ class WeatherObject {
|
||||
updateSunTime(lat, lon) {
|
||||
const now = !this.date ? new Date() : this.date.toDate();
|
||||
const times = SunCalc.getTimes(now, lat, lon);
|
||||
this.sunrise = moment(times.sunrise, "X");
|
||||
this.sunset = moment(times.sunset, "X");
|
||||
this.sunrise = moment(times.sunrise);
|
||||
this.sunset = moment(times.sunset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user