fix(calendar): use buildEventDateTime in focus time command#509
Closed
dinakars777 wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(calendar): use buildEventDateTime in focus time command#509dinakars777 wants to merge 1 commit intoopenclaw:mainfrom
dinakars777 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
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.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
calendar focus-timecommand was constructingEventDateTimedirectly without callingbuildEventDateTime(), 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-officecommand already usesbuildEventDateTimecorrectly.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-1doesn't account for CET/CEST.Changes
&calendar.EventDateTime{DateTime: strings.TrimSpace(c.From)}withbuildEventDateTime(c.From, false)(and same forc.To)buildEventDateTimeTest plan
go build ./...compiles cleanlyRelated to #422, #423, #493