Skip to content

Bug: Table view groups events under wrong date when in BST (UTC+1) #18

@MrSimonC

Description

@MrSimonC

Summary

When in BST (British Summer Time, UTC+1), the ical list table view groups events under the wrong date. The times displayed are correctly converted to local time, but the date grouping/ordering appears to use UTC dates instead of local dates. This means events that occur in the late afternoon/evening BST can appear under the following day in the table output.

Reproduction Steps

  1. Be in a BST timezone (Europe/London, during summer time, UTC+1)
  2. Create a calendar event on a Sunday at 16:00 BST (e.g., Apr 19 2026 at 16:00 local)
  3. Run:
    ical list --from "2026-04-19" --to "2026-04-21" --calendar "Shared"
    
  4. Observe in the table output that the event appears grouped with Monday Apr 20 events instead of Sunday Apr 19

Expected Behavior

The event at 16:00 BST on Sunday Apr 19 should appear grouped under Sunday Apr 19 in the table view.

Actual Behavior

The event appears grouped under Monday Apr 20 in the table view.

Additional Context

  • JSON output confirms the correct data: The JSON output (-o json) shows "start_date":"2026-04-19T15:00:00Z" which is correctly 16:00 BST on Apr 19. But the table view displays it under the wrong date.
  • The time conversion itself is correct15:00Z is shown as 16:00 in the table. It's only the date grouping/row ordering that's wrong.

Suggested Fix

The date grouping logic in the table formatter likely uses the UTC date from start_date rather than converting to the local timezone first. The fix would be to convert the event's start time to the local timezone (or the event's timezone from the timezone field) before determining which date group to place it under.

Environment

  • OS: macOS (Apple Silicon)
  • ical version: v0.8.0
  • Timezone: Europe/London (BST, UTC+1)

Reported by @MrSimonC

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions