From 6e0ab6500f2d1a42e4a249ddbfdd094550e24f90 Mon Sep 17 00:00:00 2001 From: Smith Date: Mon, 9 May 2022 21:57:55 +0200 Subject: [PATCH] fix graph span2 --- dist/game-server.js | 2 +- src/game-server.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/game-server.js b/dist/game-server.js index 100fe1d..525071d 100644 --- a/dist/game-server.js +++ b/dist/game-server.js @@ -191,7 +191,7 @@ class ServerHistory { dateHour: dh, playersNum: info.playersNum }); - d.setHours(d.getHours() - graphHistoryHours); + d.setHours(d.getHours() - graphHistoryHours - 1); const minDh = this.yyyymmddhh(d); db.data.population[this.id] = db.data.population[this.id].filter(i => i.dateHour >= minDh); this._stats = []; diff --git a/src/game-server.ts b/src/game-server.ts index aef0bf1..2991dec 100644 --- a/src/game-server.ts +++ b/src/game-server.ts @@ -248,7 +248,7 @@ class ServerHistory { playersNum: info.playersNum }); - d.setHours(d.getHours() - graphHistoryHours); + d.setHours(d.getHours() - graphHistoryHours - 1); const minDh = this.yyyymmddhh(d); db.data.population[this.id] = db.data.population[this.id].filter(i => i.dateHour >= minDh);