fix graph span2

This commit is contained in:
Smith
2022-05-09 21:57:55 +02:00
parent 885d56c49e
commit 6e0ab6500f
2 changed files with 2 additions and 2 deletions

2
dist/game-server.js vendored
View File

@@ -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 = [];

View File

@@ -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);