Fix incorrect time offset in generated schedule

When correcting for a timezone being ahead of UTC the start has to be
moved backwards in time, not forward.  Fixes the generated schodule
not using central european times.
This commit is contained in:
Hornwitser 2025-03-10 14:40:52 +01:00
parent db8393c3a9
commit 6c4107a1cb

View file

@ -169,7 +169,7 @@ export function generateDemoSchedule(): Schedule {
const origin = new Date();
const utcOffset = 1;
origin.setUTCDate(origin.getUTCDate() - origin.getUTCDay() + 1); // Go to Monday
origin.setUTCHours(utcOffset);
origin.setUTCHours(-utcOffset);
origin.setUTCMinutes(0);
origin.setUTCSeconds(0);
origin.setUTCMilliseconds(0);