From 49bf5502fd8ceabf0e9eba3b6ec106e756161933 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 12 Aug 2017 13:44:26 +0200 Subject: add time sync hotfix to tournament --- service_grab.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'service_grab.js') diff --git a/service_grab.js b/service_grab.js index 2d7d47c..cca8f30 100644 --- a/service_grab.js +++ b/service_grab.js @@ -187,6 +187,7 @@ module.exports = class Analyzer extends Service { "sort": "createdAt" } }, now = new Date(); + now.setMinutes(now.getMinutes() - 1); // TODO API hotfix, server time sync issue logger.info("requesting triple player grab", { names: names, region: region, category: category }); @@ -203,6 +204,7 @@ module.exports = class Analyzer extends Service { async grabMatches(region, lmcd) { if (lmcd == undefined) lmcd = new Date(Date.parse(this.getGrabstart("tournament"))); const now = new Date(); + now.setMinutes(now.getMinutes() - 1); // TODO API hotfix, server time sync issue // add 1s, because createdAt-start <= x <= createdAt-end // so without the +1s, we'd always get the last_match_created_date match back -- cgit v1.3.1