Assert voting range based on UTC not local

This commit is contained in:
Kalle
2023-11-11 15:29:38 +02:00
parent 6190243be8
commit 74d9010876

View File

@@ -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.");
}