Skip to content

fix(api-v2): correctly parse ISO timezone offsets when rescheduling bookings#28333

Merged
romitg2 merged 9 commits intocalcom:mainfrom
hemantmm:reschedule-timezone-parsing
Mar 30, 2026
Merged

fix(api-v2): correctly parse ISO timezone offsets when rescheduling bookings#28333
romitg2 merged 9 commits intocalcom:mainfrom
hemantmm:reschedule-timezone-parsing

Conversation

@hemantmm
Copy link
Copy Markdown
Contributor

@hemantmm hemantmm commented Mar 7, 2026

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)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

@hemantmm hemantmm requested a review from a team as a code owner March 7, 2026 15:24
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 7, 2026
@github-actions github-actions bot added the 🐛 bug Something isn't working label Mar 7, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

@sahitya-chandra sahitya-chandra left a comment

Choose a reason for hiding this comment

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

Please address Cubic comments

Copy link
Copy Markdown
Contributor

@Ryukemeister Ryukemeister left a comment

Choose a reason for hiding this comment

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

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.

@hemantmm hemantmm requested a review from a team as a code owner March 9, 2026 11:01
@hemantmm hemantmm requested a review from Ryukemeister March 9, 2026 11:02
@Ryukemeister Ryukemeister added run-ci Approve CI to run for external contributors ready-for-e2e labels Mar 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions bot added the Stale label Mar 23, 2026
@sahitya-chandra sahitya-chandra added run-ci Approve CI to run for external contributors and removed Stale run-ci Approve CI to run for external contributors labels Mar 23, 2026
Copy link
Copy Markdown
Member

@sahitya-chandra sahitya-chandra left a comment

Choose a reason for hiding this comment

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

CI checks failed can you fix it

@hemantmm
Copy link
Copy Markdown
Contributor Author

Will try to fix it.

@romitg2 romitg2 added run-ci Approve CI to run for external contributors and removed run-ci Approve CI to run for external contributors labels Mar 30, 2026
@romitg2 romitg2 enabled auto-merge (squash) March 30, 2026 10:15
Copy link
Copy Markdown
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

Thank you for this docs change, much appreciated.

@romitg2 romitg2 merged commit f7b2f27 into calcom:main Mar 30, 2026
99 of 102 checks passed
@hemantmm hemantmm deleted the reschedule-timezone-parsing branch March 30, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal Server Error when rescheduling a booking

6 participants