openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Calendar event fetching misses timezone-shifted events

Open Al629176 opened this issue 6 months ago • 1 comments

Summary

Calendar event fetching is unreliable: the agent initially misses events for today/tomorrow and only later finds them after a timezone-related correction.

Problem

When the user asks what is on their calendar today or tomorrow, the agent says there is nothing scheduled. After the user points out that they can see a meeting at 12 PM IST, the agent finds the event and says the event timezone was set to Riyadh (GST), so it was hiding in plain sight.

Expected behavior: the agent should correctly fetch calendar events for the user’s requested day using the user’s local timezone and event timezone metadata, without requiring the user to correct it.

Impact: users cannot trust calendar answers, especially around today/tomorrow queries and timezone conversions. This can cause missed meetings or incorrect daily planning.

Steps to reproduce:

  1. Connect calendar data in OpenHuman.
  2. Open the chat window.
  3. Ask what's on my calendar today.
  4. Observe the agent says there is nothing on the calendar today.
  5. Ask what about tomorrow.
  6. Observe the agent says there is nothing tomorrow either.
  7. Point out that there is a visible meeting at 12 PM IST.
  8. Observe the agent later finds the event and attributes the miss to timezone handling, such as an event set to Riyadh (GST).

Version / platform: OpenHuman desktop app on macOS, observed May 14, 2026 from user screenshot.

Solution (optional)

Fix calendar retrieval and date-window construction so natural-language date queries use the user’s local timezone and correctly include events stored with other timezones. Add logging around requested date range, user timezone, event timezone, and normalized event timestamps.

Acceptance criteria

  • [ ] Repro gone — Calendar queries for today and tomorrow return the correct events without user correction.
  • [ ] User timezone respected — Date windows for natural-language calendar queries are computed in the user’s local timezone by default.
  • [ ] Event timezone normalized — Events stored in other timezones, such as Riyadh (GST), are correctly normalized into the user’s requested day.
  • [ ] No false empty state — The agent does not answer “nothing on the calendar” when matching events exist in the normalized date range.
  • [ ] Debuggability — Logs capture safe date range, user timezone, event timezone, and normalization decisions for calendar fetches.
  • [ ] Regression safety — Unit, integration, or E2E coverage verifies today/tomorrow calendar queries across timezone-mismatched events.
  • [ ] Diff coverage ≥ 80% — the fix PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by .github/workflows/coverage.yml).

Related

  • User-provided screenshot from May 14, 2026 showing calendar queries missing an event until timezone was corrected.

Al629176 avatar May 14 '26 08:05 Al629176

Picking this up. Bug is that GOOGLECALENDAR_EVENTS_LIST calls go out without singleEvents=true or timeZone= — system already detects the IANA zone for the prompt context, just never propagates it to composio. Plan: add a small args-transformer that injects sane TZ defaults at the composio_execute path and the heartbeat planner build, plus unit coverage for the no-overwrite case. PR up shortly.

obchain avatar May 14 '26 12:05 obchain