From e98489385363ce9d905f1cb3e7ffd846be532022 Mon Sep 17 00:00:00 2001 From: Ashish Tank Date: Wed, 9 Dec 2020 11:58:47 +0100 Subject: [PATCH 1/4] Issue #2221 - Night icons are always shown for locale other then english --- modules/default/weatherforecast/weatherforecast.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index 4ecc18aa..d797625c 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -371,7 +371,7 @@ Module.register("weatherforecast", { var hour; if (forecast.dt_txt) { day = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("ddd"); - hour = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("H"); + hour = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").toDate().getHours(); } else { day = moment(forecast.dt, "X").format("ddd"); hour = moment(forecast.dt, "X").format("H"); @@ -385,7 +385,6 @@ Module.register("weatherforecast", { minTemp: this.roundValue(forecast.temp.min), rain: this.processRain(forecast, forecastList) }; - this.forecast.push(forecastData); lastDay = day; From c675421a6ad89cb581aa94611cd12a2e01f6da5b Mon Sep 17 00:00:00 2001 From: Ashish Tank Date: Wed, 9 Dec 2020 12:08:20 +0100 Subject: [PATCH 2/4] #Issue 2221 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02453bb4..9633c657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ _This release is scheduled to be released on 2021-01-01._ - Update dependencies to latest versions. - Update dependencies eslint, feedme, simple-git and socket.io to latest versions. - Update lithuanian translation. +- Weather module - Solved issue 2221 (Always displays night icons when local is other then english) ### Deleted From 85b6df3738b442e87129be200b787ed405e87c7d Mon Sep 17 00:00:00 2001 From: Ashish Tank Date: Wed, 9 Dec 2020 15:27:36 +0100 Subject: [PATCH 3/4] Issue #2221 --- modules/default/weatherforecast/weatherforecast.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index d797625c..53eee5dd 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -374,7 +374,7 @@ Module.register("weatherforecast", { hour = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").toDate().getHours(); } else { day = moment(forecast.dt, "X").format("ddd"); - hour = moment(forecast.dt, "X").format("H"); + hour = moment(forecast.dt, "X").toDate().getHours(); } if (day !== lastDay) { From 2ea38bd9a4cef75d5d23b4224e02838c486df78f Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Mon, 21 Dec 2020 11:27:12 +0100 Subject: [PATCH 4/4] Stupid commit to check github actions. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9633c657..d6e1c6a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ _This release is scheduled to be released on 2021-01-01._ - Update dependencies to latest versions. - Update dependencies eslint, feedme, simple-git and socket.io to latest versions. - Update lithuanian translation. -- Weather module - Solved issue 2221 (Always displays night icons when local is other then english) +- Weather module - Always displays night icons when local is other then English. (#2221) ### Deleted