fix: timezone fallback and attachment output hardening#251
Conversation
Lands #228. Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92b571cf80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if hours > 0 { | ||
| return fmt.Sprintf("Etc/GMT-%d", hours) | ||
| } | ||
| return fmt.Sprintf("Etc/GMT+%d", -hours) |
There was a problem hiding this comment.
Validate Etc/GMT fallback before returning it
For RFC3339 datetimes west of UTC beyond 12 hours (for example -13:00), this branch returns IDs like Etc/GMT+13, but those zones do not exist in the IANA database (time.LoadLocation fails for Etc/GMT+13/Etc/GMT+14). That means buildEventDateTime can emit an invalid timeZone, and Calendar event writes (especially recurring ones) may be rejected by the API instead of cleanly omitting timeZone as before. Please bound this fallback to valid Etc/GMT ranges or validate with time.LoadLocation before returning.
Useful? React with 👍 / 👎.
Lands #228 (conflict-resolution + a few small follow-ups).
Fixes #216
Fixes #217
Fixes #223
Test: make ci