返回提交历史
Modified
src/controllers/dynamic/worldStateController.ts
+1
-1
XFEstudio/XFESpaceNinjaServer
fix: premature week rollover (#771)
8ebd7068
代码差异
1 个文件
+1
-1
@@ -20,7 +20,7 @@ export const worldStateController: RequestHandler = (req, res) => {
20
20
};
21
21
22
22
const day = Math.trunc(new Date().getTime() / 86400000);
23
const week = Math.trunc((day + 4) / 7); // week begins on mondays
23
const week = Math.trunc((day + 3) / 7); // week begins on mondays
24
24
const weekStart = week * 604800000;
25
25
const weekEnd = weekStart + 604800000;
26
26