Refactor and remove moment.js usages

This commit is contained in:
Jakub Wojciechowski
2017-08-14 00:27:09 +02:00
parent 99e0f5b5cb
commit e86ac90853
8 changed files with 9 additions and 11 deletions

View File

@ -32,7 +32,7 @@ export default function increaseTime(duration) {
* @param target time in seconds
*/
export function increaseTimeTo(target) {
let now = latestTime().unix();
let now = latestTime();
if (target < now) throw Error(`Cannot increase current time(${now}) to a moment in the past(${target})`);
let diff = target - now;
return increaseTime(diff);