You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var time = new Date(req.params.time);
var opt = {
exclude: 'minutely,hourly,daily,alerts,flags'
};
forecast.getAtTime(req.params.lat, req.params.long, time, opt, function (err, inres, body) {
if (err) {
res.end(JSON.stringify(err));
} else {
res.end(JSON.stringify(body));
}
});
To fix it, I did this:
var time = new Date(req.params.time);
var opt = {
exclude: 'minutely,hourly,daily,alerts,flags'
};
var timesecs = Number(time) / 1000;
forecast.getAtTime(req.params.lat, req.params.long, timesecs, opt, function (err, inres, body) {
if (err) {
res.end(JSON.stringify(err));
} else {
res.end(JSON.stringify(body));
}
});
The text was updated successfully, but these errors were encountered:
This does not work:
To fix it, I did this:
The text was updated successfully, but these errors were encountered: