-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Bugfix/dst available hour mismatch #4909
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some legibility concerns. We might need to spice up our code-commenting game
packages/lib/slots.ts
Outdated
const startOfDayUTC = dayjs.utc().startOf("day"); | ||
const startOfDayUTC = dayjs.utc().set("hour", 0).set("minute", 0).set("second", 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const timeZone: string = (inviteeDate as any)["$x"]["$timezone"]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect explanation @emrysal
What does this PR do?
Aims to fix the hour discrepancy going into DST - tries to use the selected invitee date (with tz) and use the current day tz offset to properly display the booking slots.