Skip to content

Commit

Permalink
Merge pull request #1283 from jannekalliola/develop
Browse files Browse the repository at this point in the history
Changed weatherforecast to use dt_txt field
  • Loading branch information
MichMich authored May 9, 2018
2 parents cfb39c6 + 0e2e8d2 commit 1eaa9d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/default/weatherforecast/weatherforecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 1eaa9d3

Please sign in to comment.