mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
Changed weatherforecast to use dt_txt field
This commit is contained in:
parent
cfb39c6364
commit
0e2e8d2e2a
@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- In default module currentWeather/currentWeather.js line 296, 300, self.config.animationSpeed can not be found because the notificationReceived function does not have "self" variable.
|
||||
- Fixed browser-side code to work on the Midori browser.
|
||||
- Fixed issue where heat index was reporting incorrect values in Celsius and Fahrenheit. [#1263](https://github.com/MichMich/MagicMirror/issues/1263)
|
||||
- Fixed weatherforecast to use dt_txt field instead of dt to handle timezones better
|
||||
|
||||
### Updated
|
||||
- Updated Italian translation
|
||||
|
@ -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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user