summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-08-12 13:44:26 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-08-12 13:44:26 +0200
commit49bf5502fd8ceabf0e9eba3b6ec106e756161933 (patch)
tree420596ca91bfaea20277887c169066f0a78b95e6
parentecd7d32d49aa6e9e174083a3447a91ca7cb61263 (diff)
downloadbridge-49bf5502fd8ceabf0e9eba3b6ec106e756161933.tar.gz
bridge-49bf5502fd8ceabf0e9eba3b6ec106e756161933.zip
add time sync hotfix to tournament
-rw-r--r--service_grab.js2
1 files changed, 2 insertions, 0 deletions
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