diff --git a/js/weather/weather.js b/js/weather/weather.js index 91134a01..eecd882b 100644 --- a/js/weather/weather.js +++ b/js/weather/weather.js @@ -84,14 +84,14 @@ weather.updateCurrentWeather = function () { $(this.temperatureLocation).updateWithText(_newTempHtml, this.fadeInterval); - var _now = moment(), + var _now = moment().format('HH:mm'), _sunrise = moment(data.sys.sunrise*1000).format('HH:mm'), _sunset = moment(data.sys.sunset*1000).format('HH:mm'); var _newWindHtml = ' ' + this.kmh2Beaufort(_wind), _newSunHtml = ' ' + _sunrise; - if (_sunrise < _now && _sunset > now) { + if (_sunrise < _now && _sunset > _now) { _newSunHtml = ' ' + _sunset; } @@ -165,4 +165,4 @@ weather.init = function () { this.updateWeatherForecast(); }.bind(this), this.updateInterval); -} \ No newline at end of file +}