mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +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:
@@ -108,7 +108,7 @@ WeatherProvider.register("weatherbit", {
|
||||
|
||||
const currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);
|
||||
|
||||
currentWeather.date = moment(currentWeatherData.data[0].ts, "X");
|
||||
currentWeather.date = moment.unix(currentWeatherData.data[0].ts);
|
||||
currentWeather.humidity = parseFloat(currentWeatherData.data[0].rh);
|
||||
currentWeather.temperature = parseFloat(currentWeatherData.data[0].temp);
|
||||
currentWeather.windSpeed = parseFloat(currentWeatherData.data[0].wind_spd);
|
||||
|
Reference in New Issue
Block a user