Skip to content

EventStore.queryEvents() misses events at month boundaries in non-UTC timezones #76

@thedhanawada

Description

@thedhanawada

Description

The queryEvents() method with month filter uses the indices.byMonth index (keyed using local dates from _indexEvent() at line 686), but does not convert the month/year filter through the requested timezone.

Impact

When querying events for a specific month in Asia/Tokyo timezone, events indexed in December UTC are missed because the index lookup doesn't account for timezone offset. This causes silent data loss in month-scoped queries, particularly affecting month view rendering.

Example: January 31 11:59 PM UTC = February 1 in Asia/Tokyo. A query for 'January' in Tokyo timezone misses events occurring on January 31 UTC.

Code Location

  • EventStore.js:236-239 (queryEvents month filter)
  • EventStore.js:686 (_indexEvent - indexes in local date)

Root Cause

The month index is built using local calendar dates from _indexEvent(), but queryEvents() filter doesn't convert the requested timezone when looking up the index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:0-foundationImmediate fixes and test infrastructurepriority:criticalMust fix before any releasetype:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions