Skip to content

fix(calendar): use buildEventDateTime in focus time command#509

Closed
dinakars777 wants to merge 1 commit intoopenclaw:mainfrom
dinakars777:fix/calendar-focus-timezone
Closed

fix(calendar): use buildEventDateTime in focus time command#509
dinakars777 wants to merge 1 commit intoopenclaw:mainfrom
dinakars777:fix/calendar-focus-timezone

Conversation

@dinakars777
Copy link
Copy Markdown
Contributor

Summary

The calendar focus-time command was constructing EventDateTime directly without calling buildEventDateTime(), which extracts IANA timezone names from RFC3339 offsets. This meant recurring focus-time events received no IANA timezone — only a numeric offset — causing DST-transition errors.

The calendar out-of-office command already uses buildEventDateTime correctly.

Impact

Without IANA timezone info, Google Calendar uses a fixed offset for recurring focus-time events. When DST transitions occur, these events appear at the wrong time. For example, a recurring focus time at 9:00 AM CET would shift to 10:00 AM after a DST change because Etc/GMT-1 doesn't account for CET/CEST.

Changes

  • Replace &calendar.EventDateTime{DateTime: strings.TrimSpace(c.From)} with buildEventDateTime(c.From, false) (and same for c.To)
  • This brings focus time in line with the out-of-office command, which already uses buildEventDateTime

Test plan

  • go build ./... compiles cleanly
  • Create a recurring focus time event and verify the IANA timezone is included in the API request
  • Verify DST transitions are handled correctly for recurring focus time events

Related to #422, #423, #493

The focus time command was constructing EventDateTime directly without
calling buildEventDateTime(), which extracts IANA timezone names from
RFC3339 offsets. This meant recurring focus-time events received no
IANA timezone — only a numeric offset — causing DST-transition errors
for recurring events.

The out-of-office command already uses buildEventDateTime correctly.
@steipete
Copy link
Copy Markdown
Collaborator

Landed manually on main as part of a grouped calendar fix commit.

Thanks!

@steipete steipete closed this Apr 20, 2026
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