chore: 统一日报时间逻辑

This commit is contained in:
Wxw-Gu
2026-09-02 16:02:05 +08:00
parent 7c8b45a24a
commit 76e9e683c4
19 changed files with 124 additions and 43 deletions
+10
View File
@@ -345,4 +345,14 @@ describe('summary date ranges', () => {
endTime: now.getTime() / 1000
})
})
it('keeps a scheduled 20:00 today report on the current local calendar day', () => {
const now = new Date(2026, 7, 27, 20, 0, 0)
const startOfToday = new Date(2026, 7, 27, 0, 0, 0)
expect(getSummaryDateRangeAt('today', now)).toEqual({
startTime: startOfToday.getTime() / 1000,
endTime: now.getTime() / 1000
})
})
})