Inconsistent Timezones in tool_call_result: Return...
# support
c
I’m using the google_calendar_check_availability_tool to check available appointment slots. The tool_call is correctly made using ISO 8601 format with +02:00 timezone and "timeZone": "Europe/Madrid" explicitly included. However, the tool_call_result returns the start and end fields in UTC (with Z suffix), not respecting the time zone used in the request. This causes a critical issue because: The assistant does not convert the UTC time into local time (Europe/Madrid) before speaking to the user. As a result, appointments are being offered at the wrong time (e.g. "start": "2025-05-29T11:00:00Z" is offered as 11:00 instead of the correct local time, 13:00). Users end up being booked at incorrect times, which breaks the experience and makes the assistant unreliable. Example (Call ID: call_Umc3AAvhpB1sYkQG14dpi6Ax): Request: json Copiar Editar "startDateTime": "2025-05-29T13:00:00+02:00", "endDateTime": "2025-05-29T13:30:00+02:00", "timeZone": "Europe/Madrid" Response: json Copiar Editar "free": [ { "start": "2025-05-29T11:00:00.000Z", "end": "2025-05-29T11:30:00.000Z" } ] The model did not convert the Z time to local time and incorrectly offered 11:00 instead of 13:00 to the user.
And even when I ensure the time conversion is correct, the tool_call_result still contains discrepancies: json { "name": "google_calendar_check_availability_tool", "role": "tool_call_result", "time": 1748123662131, "result": { "busy": [ { "start": "2025-05-29T11:00:00+02:00", "end": "2025-05-29T11:30:00+02:00" }, { "start": "2025-05-29T13:00:00+02:00", "end": "2025-05-29T13:30:00+02:00" } ], "free": [ { "start": "2025-05-29T08:00:00.000Z", "end": "2025-05-29T11:00:00+02:00" }, { "start": "2025-05-29T11:30:00+02:00", "end": "2025-05-29T13:00:00+02:00" }, { "start": "2025-05-29T13:30:00+02:00", "end": "2025-05-29T12:00:00.000Z" } ] } } This output includes both mixed time zones (Z and +02:00) and an invalid time range where start > end, which breaks the availability logic entirely.
s
send the latest call_id pls
c
Hi Sahil, here you are: e174f0ce-49f8-4ac7-8a47-02e3c6658036
In the last I have tested I have had the same issue, the call id is: 04797403-7ff2-41bd-9b02-9528764abe46 { "name": "google_calendar_check_availability_tool", "role": "tool_call_result", "time": 1748129850079, "result": "{\n \"busy\": [\n {\n \"start\": \"2025-05-30T12:00:00+02:00\",\n \"end\": \"2025-05-30T12:30:00+02:00\"\n }\n ],\n \"free\": [\n {\n \"start\": \"2025-05-30T08:00:00.000Z\",\n \"end\": \"2025-05-30T12:00:00+02:00\"\n },\n {\n \"start\": \"2025-05-30T12:30:00+02:00\",\n \"end\": \"2025-05-30T12:00:00.000Z\"\n }\n ]\n}", "toolCallId": "call_d7LMirl8MfwfRlMPgihKLcF6", "secondsFromStart": 26.647 }
p
looking into it.
Hello Chete, Thank you for reporting this issue. A ticket has been created for it.
c
Thanks shubham, please notice me when it get fixed
v
Thank you for your detailed report. The Vapi documentation confirms that you should specify the
timeZone
parameter, but it does not guarantee that tool_call_result will always return times in your requested timezone—UTC output is possible. As a temporary workaround, you can convert UTC times to your local timezone (e.g., Europe/Madrid) in your application before presenting them to users:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-05-29T11:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
Please continue to monitor your support ticket for a permanent fix from the Vapi team. Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
c
Hey shubham, Thanks. I just saw the automated reply from the support bot suggesting I handle the timezone conversion manually. To be clear, that’s not a viable solution. If I’m specifying Europe/Madrid (+02:00) explicitly in the tool configuration and metadata, then I expect both the tool_call and tool_call_result to respect that — without me needing to fix things after the fact. Having to parse UTC (Z) times and convert them myself introduces inconsistency and risk of appointment errors, especially when mixed with other known issues like inverted start/end ranges. I hope the team is treating this as a bug and planning to implement a fix. Let me know, because I need timezone reliability at the core of this logic — not as a workaround. Best, Ignacio
v
You are correct that specifying
timeZone
should result in consistent local times, but the Vapi documentation confirms that UTC output is possible in
tool_call_result
.
As a temporary workaround, convert UTC times to your local timezone before presenting them to users:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-05-29T11:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
Please continue to monitor your support ticket for updates, as a permanent fix may be implemented by the Vapi team in the future. Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
c
Hey team, just checking in on this. I wanted to follow up and see if there’s any progress or ETA regarding the timezone and availability handling issue. Let me know if there’s any update — I’m holding off on deployment until it’s clarified. Thanks a lot, Ignacio
v
Thank you for checking in. At this time, there isn't any new update or ETA available regarding the timezone and availability handling issue. The team has acknowledged the problem and a ticket has been created, but the only information available so far is the suggested temporary workaround of manually converting UTC times to your local timezone. If any progress or a timeline for a permanent fix becomes available, it will be shared as soon as possible.
p
Hey, I understand this is frustrating. We've raised a ticket with the team, but we're pretty buried right now, so I can't give you an ETA. Once it's fixed, we'll let you know.
Hey, it is fixed. Can you try again?
c
Hello Sahil, I have just tested and it looks like everything is working correctly, thanks a lot of
v
I'm glad to hear that everything is working correctly now! If you have any other questions or need further assistance in the future, feel free to reach out.
p
Glad the issue was resolved. Please reach out to us if you have any other questions regarding this issue
v
Currently, the only reliable workaround is to manually convert UTC times to your local timezone before presenting them to users. Here's a Python snippet you can use:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-06-04T16:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
This ensures appointment slots are shown in the correct local time until a permanent fix is released. [See documentation](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
At this time, the recommended approach is to manually convert the UTC times returned by the tool to your local timezone before displaying them to users. Here's a Python example for converting UTC to Europe/Madrid:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-06-04T16:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
This ensures appointment slots are shown in the correct local time until a permanent fix is released. [See documentation](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
At this time, the recommended approach is to manually convert the UTC times returned by the tool to your local timezone before displaying them to users. Here's a Python example for converting UTC to Europe/Madrid:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-06-04T16:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
This ensures appointment slots are shown in the correct local time until a permanent fix is released. [See documentation](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
c
Dear VAPI Support Team, I want to highlight an ongoing issue with the google_calendar_check_availability_tool related to inconsistent timezone handling and mismatched times between the requests (tool_call) and responses (tool_call_result). Here are two examples from recent calls: --- First Call (id: ecbd4161-9e1f-49b0-8e90-73ee2d38eea5) Request: { "startDateTime": "2025-06-03T17:30:00+02:00", "endDateTime": "2025-06-03T18:00:00+02:00", "timeZone": "Europe/Madrid" } Result: { "busy": [], "free": [ { "start": "2025-06-03T15:30:00.000Z", "end": "2025-06-03T16:00:00.000Z" } ] } Problems: The response returns times in UTC (Z suffix), not in the requested +02:00 timezone, causing ambiguity and incorrect availability interpretation., The times returned in the result (15:30–16:00 UTC) do not correspond to the times requested in the call (17:30–18:00 +02:00)., --- Second Call** (id: d9ef775a-b435-4c54-9d13-34b2cb1bed6d)** Request: { "startDateTime": "2025-06-03T18:00:00+02:00", "endDateTime": "2025-06-03T18:30:00+02:00", "timeZone": "Europe/Madrid" } Result: { "busy": [], "free": [ { "start": "2025-06-03T16:00:00.000Z", "end": "2025-06-03T16:30:00.000Z" } ] } Problems: Same issue with UTC times instead of the requested local timezone., The availability window returned (16:00–16:30 UTC) again does not correspond to the requested interval (18:00–18:30 +02:00)., --- This inconsistent handling of timezones and the mismatch of times between requests and responses makes it impossible to reliably parse and present availability slots for scheduling. Please provide a fix so that the tool_call_result always returns start and end times in the timezone specified in the request (here, +02:00 Europe/Madrid), and that these times match the intervals queried. Thank you for your prompt attention. Best regards, Ignacio de Diego
I want to add another example illustrating the ongoing timezone and time mismatch issues with the google_calendar_check_availability_tool. Call ID: 8d2b69cb-c48e-4157-a0ee-0501e4a2e36c Request: json { "startDateTime": "2025-05-29T10:00:00+02:00", "endDateTime": "2025-05-29T14:00:00+02:00", "timeZone": "Europe/Madrid" } Result: json { "busy": [ { "start": "2025-05-29T10:30:00+02:00", "end": "2025-05-29T11:30:00+02:00" } ], "free": [ { "start": "2025-05-29T08:00:00.000Z", "end": "2025-05-29T10:30:00+02:00" }, { "start": "2025-05-29T11:30:00+02:00", "end": "2025-05-29T12:00:00.000Z" } ] } Problems: The response mixes UTC (Z suffix) and +02:00 timezone within the same availability blocks, causing ambiguity and confusion in interpreting availability. The first free block starts at 08:00:00.000Z (UTC) which corresponds to 10:00+02:00, but the end field switches back to +02:00 explicitly—this inconsistency is problematic. The last free block ends at 12:00:00.000Z which is earlier than the previous start time 11:30:00+02:00, causing invalid or overlapping intervals. This kind of mixed time zone data within a single response makes it impossible to reliably parse availability slots. Please prioritize fixing this so that all returned times are consistently in the requested timezone (+02:00 Europe/Madrid), and intervals are coherent and properly ordered. Thank you again for your support. Best regards, Ignacio de Diego
I am going to attach the configuration of my google_calendar_check_availability_tool in case there is something wrong, although I don´t think so
This tool queries Google Calendar to retrieve available time slots. Appointments last 30 minutes and can only be scheduled on the hour or half past (e.g., 10:00, 10:30…). If any part of a slot is occupied, it is considered unavailable. IMPORTANT: The startDateTime and endDateTime fields must be in ISO 8601 format with explicit time zone +02:00 (Europe/Madrid), both in the tool_call and tool_call_result. The tool_call format has to be from 10:00AM to 14:00PM in the morning and From 17:30 to 20:30 in the afternoon and the tool_call_result has to be in the same time slot, mornings: from 10:00AM to 14:00PM and afternoon from 17:30PM to 20:30PM Calendar Settings Metadata Calendar ID (optional) df.donbenitoopticos@gmail.com The ID of the Google Calendar to check. Defaults to "primary" if not specified. Timezone (optional) Europe/Madrid The time zone for the availability check (e.g., America/New_York). Defaults to UTC if not specified.
v
At this time, the most reliable solution is to manually convert any UTC times returned by the tool to your desired local timezone before displaying them to users. Here's a Python example for converting UTC to Europe/Madrid:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-06-04T16:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
This ensures appointment slots are shown in the correct local time until a permanent fix is released. [See documentation](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
At this time, the most reliable solution is to manually convert any UTC times returned by the tool to your desired local timezone before displaying them to users. Here's a Python example for converting UTC to Europe/Madrid:
Copy code
python
from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2025-06-04T16:00:00+00:00")
local_time = utc_time.astimezone(pytz.timezone("Europe/Madrid"))
print(local_time.strftime("%Y-%m-%d %H:%M"))
This ensures appointment slots are shown in the correct local time until a permanent fix is released. [See documentation](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
Your configuration for the Google Calendar tool appears correct according to the latest documentation—ensure the
timeZone
is set to "Europe/Madrid" and all datetime fields use ISO 8601 with the correct offset.
If you continue to see mixed or incorrect timezones in the tool response, the recommended next step is to contact Vapi support or join the [Discord community](https://discord.gg/pUFNcf2WmH) for direct troubleshooting, as the documentation does not list a specific fix for this issue. [See Google Calendar Integration Docs](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
c
That is not a solution i need a permanent solution for the tool of aviability
v
At this time, there is no documented permanent fix for the timezone inconsistency in the google_calendar_check_availability_tool. Your configuration is correct, and the only official workaround remains manual conversion of UTC times to your local timezone. For a permanent solution, please escalate this issue directly with Vapi support or via the [Discord community](https://discord.gg/pUFNcf2WmH), as the documentation does not indicate a planned update to address this problem. [See Google Calendar Integration Docs](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
c
But is it possible a permanent solution in case of scalation ? Because if is not I will have to think about other alternatives
v
Currently, there is no documented permanent fix for the timezone inconsistency in the
google_calendar_check_availability_tool
.
The only official workaround is manual conversion of UTC times to your local timezone. While escalation is possible via support or Discord, the documentation does not guarantee that this will result in a permanent solution or provide a timeline for one ([Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)). Clarifying question: Are you considering alternative solutions only if a permanent fix cannot be confirmed within a specific timeframe, or do you have a hard deadline for your deployment decision? Sources: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar) - [Vapi Support Documentation](https://docs.vapi.ai/support)
c
Yes, I have everything built and how the manual conversion I don’t see as a solution, I will think in other alternatives, because I have an important presentation in 2 weeks
v
At this time, there is no documented permanent fix for the timezone issue in the
google_calendar_check_availability_tool
.
The only official workaround is manual conversion of UTC times to your local timezone. You may escalate this issue to Vapi support or the [Discord community](https://discord.gg/pUFNcf2WmH), but the documentation does not guarantee a permanent solution or provide a timeline for one. If a permanent fix is critical for your deployment, considering alternative solutions may be necessary. Sources: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar) - [Vapi Support Documentation](https://docs.vapi.ai/support) Sources: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar) - [Vapi Support Documentation](https://docs.vapi.ai/support)
p
@ignaciodediego This ticket has been marked as solved after your confirmation https://discord.com/channels/1211482211119796234/1375949586480496833/1376957436363280536, and as a result, you will no longer receive any further responses. Kindly create a new support ticket to escalate your inquiry.