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: fix wrong date for google calendar event #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Valerio-Tonelli
Copy link

@Valerio-Tonelli Valerio-Tonelli commented Jan 5, 2025

this PR fixes an issue with google calendar for Android 12+ that set the event a day before the expected day.

Screenshots of the issue:

image
image

Probable Explanation

All-day events in Google Calendar are treated differently from timed events. For all-day events, the start time should be at midnight (00:00:00) in UTC to match the intended date. When you set an all-day event, the calendar interprets the timestamp as midnight in UTC.

Timestamp Issues

For istance, the timestamp 1736208000000 corresponds to midnight on January 7, 2025, in UTC. However, when you set an all-day event, Google Calendar might interpret this timestamp as the end of the previous day due to how it handles the day transition:

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.

1 participant