Skip to content

Commit 797e45d

Browse files
veeckrejas
authored andcommitted
SunCalc provides a date object, not just a unix timestamp
therefore we dont need this explicit formatting
1 parent 00cdb76 commit 797e45d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/default/weather/weatherobject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ class WeatherObject {
136136
updateSunTime(lat, lon) {
137137
const now = !this.date ? new Date() : this.date.toDate();
138138
const times = SunCalc.getTimes(now, lat, lon);
139-
this.sunrise = moment.unix(times.sunrise);
140-
this.sunset = moment.unix(times.sunset);
139+
this.sunrise = moment(times.sunrise);
140+
this.sunset = moment(times.sunset);
141141
}
142142

143143
/**

0 commit comments

Comments
 (0)