clock: ignore cached date for sunrise
Fixes
@@ -186,10 +186,10 @@ export default class WeatherTile extends React.Component {
const d = data['weather'][0];
const bg = this.colorFromCondition(data);
- const sunset = moment(d.date + ' ' + d.astronomy[0].sunset, 'YYYY-MM-DD hh:mm A');
+ const sunset = moment(moment().format('YYYY-MM-DD') + ' ' + d.astronomy[0].sunset, 'YYYY-MM-DD hh:mm A');
const sunsetDiff = sunset.diff(moment(), 'hours');
- const sunrise = moment(d.date + ' ' + d.astronomy[0].sunrise, 'YYYY-MM-DD hh:mm A');
+ const sunrise = moment(moment().format('YYYY-MM-DD') + ' ' + d.astronomy[0].sunrise, 'YYYY-MM-DD hh:mm A');
let sunriseDiff = sunrise.diff(moment(), 'hours');
if (sunriseDiff > 24) {
