Skip to content

fix(calendar): handle missing primary alias in time filters#396

Open
salmonumbrella wants to merge 1 commit intosteipete:mainfrom
salmonumbrella:fix/issue-367-calendar-date-filters
Open

fix(calendar): handle missing primary alias in time filters#396
salmonumbrella wants to merge 1 commit intosteipete:mainfrom
salmonumbrella:fix/issue-367-calendar-date-filters

Conversation

@salmonumbrella
Copy link
Contributor

@salmonumbrella salmonumbrella commented Mar 3, 2026

Summary

  • make getUserTimezone resilient when calendarList/primary returns 404
  • fall back to calendar list entries (preferring the primary entry) and use UTC when no timezone is available
  • add regression tests for both the timezone fallback and calendar events --today flow

Fixes #367

Testing

  • go test ./internal/cmd -run 'TestGetUserTimezonePrimaryNotFoundFallsBackToCalendarList|TestCalendarEventsCmd_TodayPrimaryAliasNotFound|TestGetUserTimezoneInvalid'
  • make test

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.

Bug: calendar events list returns 404 when using --today, --from, or --days flags

1 participant