Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use same timezone to compare #12982

Closed
wants to merge 2 commits into from
Closed

Conversation

Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Jan 2, 2024

Fixes: #12971

Although i wasn't able to replicate the bug but this seems #12982 (comment) the main problem.

Copy link

vercel bot commented Jan 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 5:08pm
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 5:08pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 5:08pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 5:08pm
cal-demo ⬜️ Ignored (Inspect) Jan 2, 2024 5:08pm
qa ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 5:08pm
ui ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 5:08pm

@github-actions github-actions bot added the High priority Created by Linear-GitHub Sync label Jan 2, 2024
Copy link
Contributor

github-actions bot commented Jan 2, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@zomars zomars added the core area: core, team members only label Jan 2, 2024

//find out if the meeting is in the past
const isPast = booking?.endTime <= exitDate;
Copy link
Contributor Author

@Udit-takkar Udit-takkar Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comparison might not work properly because booking.endTime is always in UTC but exitDate in browser's local time

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the problem because during this comparison there is a valueOf cast (and it compares the numeric offset from UTC 197..)

Copy link
Contributor Author

@Udit-takkar Udit-takkar Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: exitDate is already in UTC format "2024-01-03T05:49:44.703Z". I thought it's in local time format

Copy link
Contributor

github-actions bot commented Jan 2, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only High priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-2850] After reschedule Cal Video link is broken
4 participants