Fix Issue #95: "Openweather shows previous day's forecast, and it's wrong"

This commit is contained in:
Chris Gantz 2016-03-04 07:51:40 -08:00
parent 1ac0d5206b
commit ffe9c88040

View File

@ -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 = '';