Skip to content

Date-only --from/--to flags don't respect local timezone #155

@svs

Description

@svs

Description

When using date-only values for --from and --to flags in calendar commands, they appear to be interpreted as UTC midnight rather than local timezone midnight.

Steps to Reproduce

# System timezone: IST (+05:30)
# Today: 2026-02-01

# This returns no events:
gog calendar events --from 2026-02-02 --to 2026-02-02

# This also returns no events:
gog calendar events --from tomorrow --to tomorrow

# But this works correctly:
gog calendar events --from 2026-02-02T00:00:00+05:30 --to 2026-02-02T23:59:59+05:30

# And this shows the events exist:
gog calendar events --from 2026-02-02 --to 2026-02-03

Expected Behavior

--from 2026-02-02 --to 2026-02-02 should return all events on Feb 2 in the user's local timezone.

Actual Behavior

No events are returned because the date is interpreted as UTC midnight, which is 05:30 AM IST - effectively cutting off the query before any events occur.

Environment

  • gog version: v0.9.0
  • OS: Linux (Manjaro)
  • Timezone: Asia/Kolkata (IST, +05:30)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions