Fix date nonsense

This commit is contained in:
Regalijan 2025-06-19 16:29:38 -04:00
parent 98c662ed9b
commit 44ab73c8a5
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -74,6 +74,9 @@ export async function onRequestPatch(context: RequestContext) {
const date = new Date();
const currentDay = date.getUTCDate();
// Set to first of month to avoid any issues with month incrementation, then add month and subtract one day to get the last day of this month
date.setUTCDate(1);
date.setUTCMonth(date.getUTCMonth() + 1);
date.setUTCDate(0);
if (