fix: use setUTCDate in getNextRecheckDate to avoid local-timezone off-by-one
This commit is contained in:
@@ -14,7 +14,7 @@ export function getNextRecheckDate(verifiedAt: string, currentRound: number): st
|
|||||||
const days = NEXT_INTERVAL_DAYS[currentRound]
|
const days = NEXT_INTERVAL_DAYS[currentRound]
|
||||||
if (days === null || days === undefined) return null
|
if (days === null || days === undefined) return null
|
||||||
const base = new Date(verifiedAt)
|
const base = new Date(verifiedAt)
|
||||||
base.setDate(base.getDate() + days)
|
base.setUTCDate(base.getUTCDate() + days)
|
||||||
return base.toISOString().split('T')[0]
|
return base.toISOString().split('T')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user