mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-13 23:55:11 +00:00
Fix Issue #95: "Openweather shows previous day's forecast, and it's wrong"
This commit is contained in:
@@ -130,6 +130,10 @@ weather.updateWeatherForecast = function () {
|
||||
|
||||
var _forecast = data.list[i];
|
||||
|
||||
//don't show yesterday's forecast; each date, .dt is 12p local;
|
||||
var _12hours = 60 * 60 * 12 * 1000;
|
||||
if (_forecast.dt < Math.floor((Date.now() - _12hours) / 1000)) continue;
|
||||
|
||||
if (this.orientation == 'vertical') {
|
||||
_forecastHtml2 = '';
|
||||
_forecastHtml3 = '';
|
||||
|
Reference in New Issue
Block a user