Changed weatherforecast to use dt_txt field

This commit is contained in:
Janne Kalliola
2018-05-08 18:45:38 +03:00
parent cfb39c6364
commit 0e2e8d2e2a
2 changed files with 3 additions and 2 deletions

View File

@@ -333,8 +333,8 @@ Module.register("weatherforecast",{
var forecast = data.list[i];
this.parserDataWeather(forecast); // hack issue #1017
var day = moment(forecast.dt, "X").format("ddd");
var hour = moment(forecast.dt, "X").format("H");
var day = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("ddd");
var hour = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("H");
if (day !== lastDay) {
var forecastData = {