fix(api-v2): correctly parse ISO timezone offsets when rescheduling bookings#28333
fix(api-v2): correctly parse ISO timezone offsets when rescheduling bookings#28333romitg2 merged 9 commits intocalcom:mainfrom
Conversation
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts">
<violation number="1" location="apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts:699">
P2: Reschedule parsing is now environment-dependent for ISO strings without an explicit offset/zone. `@IsDateString()` allows offset-less ISO, and Luxon defaults to the server’s local zone when no offset is provided, so removing `{ zone: "utc" }` can shift rescheduled times across environments before converting to the attendee’s zone.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
Outdated
Show resolved
Hide resolved
sahitya-chandra
left a comment
There was a problem hiding this comment.
Please address Cubic comments
There was a problem hiding this comment.
hey @hemantmm, I had a closer look at this issue and it looks like removing the UTC parsing is not the correct fix. we need start time in UTC for both create and rescheduling bookings, however we don't explicitely mention this in the reschedule endpoint docs. if you have a look at the create a booking endpoint docs here we have this
The start needs to be in UTC aka if the timezone is GMT+2 in Rome and meeting should start at 11, then UTC time should have hours 09:00 aka without time zone.
the behaviour should be consistent for reschedule endpoint as well. so the real issue isn't the code — it's that the reschedule docs are missing the "in UTC timezone" requirement. The fix should be updating the reschedule endpoint's start field description to match create's: "Start time in ISO 8601 format in UTC timezone", and keeping { zone: "utc" } as-is.
Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com>
…ntmm/cal.com into reschedule-timezone-parsing
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
sahitya-chandra
left a comment
There was a problem hiding this comment.
CI checks failed can you fix it
|
Will try to fix it. |
emrysal
left a comment
There was a problem hiding this comment.
Thank you for this docs change, much appreciated.
closes: #28310
What does this PR do?
Remove the forced UTC parsing so Luxon respects the timezone information present in the ISO string.
Mandatory Tasks (DO NOT REMOVE)