Skip to content

Commit fe0d7e9

Browse files
committed
Use numbers rather than dates for the timestamps
1 parent a68673f commit fe0d7e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/data_form.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ DataForm.prototype.internalSearch = function (req, resourcesToSearch, includeRes
224224
if (typeof req.query === 'undefined') {
225225
req.query = {};
226226
}
227-
const timestamps = { sentAt: req.query.sentAt, startedAt: new Date(), completedAt: undefined };
227+
const timestamps = { sentAt: req.query.sentAt, startedAt: new Date().valueOf(), completedAt: undefined };
228228
let searches = [],
229229
resourceCount = resourcesToSearch.length,
230230
searchFor = req.query.q || '',
@@ -466,7 +466,7 @@ DataForm.prototype.internalSearch = function (req, resourcesToSearch, includeRes
466466
moreCount += results.length - limit;
467467
results.splice(limit);
468468
}
469-
timestamps.completedAt = new Date();
469+
timestamps.completedAt = new Date().valueOf();
470470
callback(null, { results, moreCount, timestamps });
471471
}
472472
}

0 commit comments

Comments
 (0)