mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-12 15:01:38 +03:00
clock: ignore cached date for sunrise
Fixes https://github.com/urbit/landscape/issues/190
This commit is contained in:
parent
eca9a00026
commit
1a570e17be
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user