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

Timezone information is ignored in google calendar event actions #1106

Open
data-overflow opened this issue Dec 30, 2024 · 4 comments
Open

Comments

@data-overflow
Copy link

Summary

Composio requires the datetime to be in ISO format (which can optionally have timezone information) but assumes all datetime to be in UTC and adjusts the time before calling the functions. This behavior is undesired and causes problems while working with conversational agents.

Example

The following two variants of code results in the same outcome
Case 1:

toolset.execute_action(
    action=Action.GOOGLECALENDAR_CREATE_EVENT,
    params={"start_datetime": "2024-12-30T07:30:00", "event_duration_hour": 2, "event_duration_minutes": 0, "summary": "test"},
)

Case 2:

toolset.execute_action(
    action=Action.GOOGLECALENDAR_CREATE_EVENT,
    params={"start_datetime": "2024-12-30T07:30:00+05:30", "event_duration_hour": 2, "event_duration_minutes": 0, "summary": "test"},
)

Output:
image

In both the above cases +5:30 hours is applied to match my current timezone although in the second case we explicitly mention the timezone. Additionally, providing the "timezone" parameter in the params also has no effect

@plxity
Copy link
Contributor

plxity commented Dec 30, 2024

@data-overflow Thanks for reporting this, I'm checking this issue

@data-overflow
Copy link
Author

Yes, I appreciate it! The issue is reproducible from the dashboard as well.
WhatsApp Image 2024-12-30 at 17 09 26_11ef263c
Here are the parameters I used:
start_datetime: 2024-12-30T12:00:00+05:30 (12pm IST)
event_duration_hour: 2
event_duration_minutes: 1 (minor bug, the UI assumes 0 as null and throws "this field is required" error)
summary: test
timezone: Asia/Kolkata

Output:
image

@Devanshusisodiya
Copy link
Contributor

@data-overflow the datetime format 2024-12-30T07:30:00+05:30 is not supported by Google Calendar itself, although there is support for timezone by using the Timezone parameter. Just need to make sure the timezone being passed is valid.

image

Thanks. Let us know if there are any issues.

@data-overflow
Copy link
Author

Hi @Devanshusisodiya, thank you for the response. I've indeed tested by passing the timezone in the required IANA format. Here's an example:
I used start datetime as: 2025-01-02T12:00:00 (12pm, without timezone information)
image

The output is still processed to Asia/Kolkata time.
image

Does the timezone require a completely different format than the one specified? Or is it by chance ignored entirely?

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

No branches or pull requests

3 participants