round the seconds

This commit is contained in:
Ryan McKinley 2016-11-14 13:40:33 -08:00
parent 6e94ccea07
commit 3588b9732f

View File

@ -275,7 +275,12 @@ export default class InfluxDatasource {
}
date = dateMath.parse(date, roundUp);
}
return (date.valueOf() / 1000).toFixed(0) + 's';
var secs = date.valueOf() / 1000;
if(roundUp) {
secs += 1;
}
return secs.toFixed(0) + 's';
}
}