mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-04 22:58:03 +00:00
Merge pull request #2224 from ashishtank/develop
Issue 2221 - Weather module always shows night icons for locale other then english
This commit is contained in:
commit
684dcdcef3
@ -28,6 +28,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 - Always displays night icons when local is other then English. (#2221)
|
||||
|
||||
### Deleted
|
||||
|
||||
|
@ -371,10 +371,10 @@ 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");
|
||||
hour = moment(forecast.dt, "X").toDate().getHours();
|
||||
}
|
||||
|
||||
if (day !== lastDay) {
|
||||
@ -385,7 +385,6 @@ Module.register("weatherforecast", {
|
||||
minTemp: this.roundValue(forecast.temp.min),
|
||||
rain: this.processRain(forecast, forecastList)
|
||||
};
|
||||
|
||||
this.forecast.push(forecastData);
|
||||
lastDay = day;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user