From 74d90108765f893c0e39bc66fb08d94a58caa1ec Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 11 Nov 2023 15:29:38 +0200 Subject: [PATCH] Assert voting range based on UTC not local --- app/features/plus-voting/core/voting-time-new.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/features/plus-voting/core/voting-time-new.ts b/app/features/plus-voting/core/voting-time-new.ts index 7154477e3..e384841f1 100644 --- a/app/features/plus-voting/core/voting-time-new.ts +++ b/app/features/plus-voting/core/voting-time-new.ts @@ -42,7 +42,7 @@ export function rangeToMonthYear(range: { startDate: Date; endDate: Date }) { export function seasonToVotingRange(season: RankingSeason) { const { ends: date } = season; - if (date.getDay() !== 0) { + if (date.getUTCDay() !== 0) { throw new Error("End date is not a Sunday."); }