diff --git a/apps/schedule/src/app/pipes/getdatetime.pipe.ts b/apps/schedule/src/app/pipes/getdatetime.pipe.ts index 703ea05..e0a142c 100644 --- a/apps/schedule/src/app/pipes/getdatetime.pipe.ts +++ b/apps/schedule/src/app/pipes/getdatetime.pipe.ts @@ -14,12 +14,11 @@ export class GetDateTimePipe implements PipeTransform { transform(slot: Slot): Date { let result = new Date(); let day = WEEKDAYS.indexOf(slot.label.toLowerCase()); + result.setUTCHours(0, 0, 0, 0); result.setDate(result.getDate() + day - result.getDay()); let remainder = slot.offset % 60; result.setUTCHours(slot.hours - (slot.offset - remainder) / 60 >> 0); result.setUTCMinutes(slot.minutes - remainder); - result.setUTCSeconds(0); - result.setUTCMilliseconds(0); if (result.getTime() < Date.now()) { result.setDate(result.getDate() + 7); }