fix: pagination across days

This commit is contained in:
Namekuji 2023-09-19 02:28:09 -04:00
parent 0f387858d8
commit 8fd4773260
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -503,7 +503,7 @@ export async function execPaginationQuery(
// Reached the end of partition. Queries posts created one day before.
scannedPartitions++;
const yesterday = new Date(untilDate.getTime() - 86400000);
yesterday.setUTCHours(23, 59, 59, 999);
yesterday.setHours(23, 59, 59, 990);
untilDate = yesterday;
if (sinceDate && untilDate < sinceDate) break;
}