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

Update Google.php #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update Google.php #198

wants to merge 1 commit into from

Conversation

iYared
Copy link

@iYared iYared commented Nov 14, 2024

Fix: Exclude ctz Parameter for All-Day Events to Resolve Google Calendar Android Issue

This PR addresses an issue with the generate method in the Google calendar link generator, specifically for all-day events on Android devices. When the ctz (timezone) parameter is included for all-day events, Android devices encounter problems interpreting the event duration correctly, leading to inaccurate calendar entries.

Changes:

  • Updated the generate method to conditionally exclude the ctz parameter if the event is an all-day event.
  • This ensures that all-day events function as expected across platforms, especially on Android, by omitting the timezone parameter.

Impact:

This fix improves compatibility and accuracy for all-day events on Android, resolving an existing issue where Android misinterprets all-day events when the ctz parameter is included.

References:

  • Fixes issue with all-day event compatibility on Android when ctz is passed in the URL.

TEST CASE (Same Event Link)

All Day Event with CTZ Param (Test on Android : Google Calendar) - Issue
https://calendar.google.com/calendar/render?action=TEMPLATE&dates=20241101%2F20241103&details=EVENT_DESC&location=EVENT_LOCATION&text=EVENT_TITLE&ctz=UTC

All Day Event Without CTZ Param (Test on Android : Google Calendar) - No Isse
https://calendar.google.com/calendar/render?action=TEMPLATE&dates=20241101%2F20241103&details=EVENT_DESC&location=EVENT_LOCATION&text=EVENT_TITL

Fix: Exclude ctz Parameter for All-Day Events to Resolve Android Issue

This PR addresses an issue with the generate method in the Google calendar link generator, specifically for all-day events on Android devices. When the ctz (timezone) parameter is included for all-day events, Android devices encounter problems interpreting the event duration correctly, leading to inaccurate calendar entries.
Copy link
Collaborator

@alies-dev alies-dev 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 such detailed explanation, @iYared ! Looks great! I assume we also need to update tests, can you please take a look?

@alies-dev alies-dev self-requested a review November 14, 2024 20:27
Copy link
Collaborator

@alies-dev alies-dev left a comment

Choose a reason for hiding this comment

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

please update tests/snapshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants