Compare commits

...

2 Commits

Author SHA1 Message Date
Keith Williams d73d26f033
Merge branch 'main' into fix/cal-video-past 2024-01-02 11:59:40 -05:00
Udit Takkar ae895be072 fix: use same timezone to compare 2024-01-02 16:18:23 +05:30

View File

@ -305,11 +305,12 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
}
//daily.co calls have a 60 minute exit buffer when a user enters a call when it's not available it will trigger the modals
const now = new Date();
const exitDate = new Date(now.getTime() - 60 * 60 * 1000);
const exitDate = dayjs.utc().subtract(1, "hour");
const endTime = dayjs.utc(booking?.endTime);
//find out if the meeting is in the past
const isPast = booking?.endTime <= exitDate;
const isPast = exitDate.isAfter(endTime);
if (isPast) {
return {
redirect: {