Skip to content

Fix timezone handling for recurring events#178

Merged
muness merged 1 commit into
open-horizon-labs:masterfrom
sKawashima:fix-recurring-schedule-filter
Jun 3, 2025
Merged

Fix timezone handling for recurring events#178
muness merged 1 commit into
open-horizon-labs:masterfrom
sKawashima:fix-recurring-schedule-filter

Conversation

@sKawashima

@sKawashima sKawashima commented May 30, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Fix timezone conversion issues in recurring event processing that caused incorrect date filtering
  • Improve applyRecurrenceDateAndTimezone function to handle timezone offsets correctly
  • Update date range comparison logic to use timezone-aware calculations

Problem

When running in non-UTC timezones (e.g., JST UTC+9), recurring events scheduled after 15:00 would incorrectly display events from the previous day due to improper timezone handling in the recurrence calculation logic.

Solution

  1. Modified applyRecurrenceDateAndTimezone to properly handle UTC recurrence dates and convert them to the correct timezone while preserving the original event time
  2. Updated processRecurringRules to use UTC for rrule calculations and timezone-aware date comparison
  3. Fixed date filtering logic to correctly identify events within the requested date range

Test plan

  • Test recurring events in JST timezone (UTC+9)
  • Verify events after 15:00 show correct day's events
  • Confirm timezone conversion preserves original event times
  • Build and verify no compilation errors

@muness muness left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and the readability improvements!

@muness muness merged commit 924b441 into open-horizon-labs:master Jun 3, 2025
@muness

muness commented Jun 3, 2025

Copy link
Copy Markdown
Member

I apologize for the delay, just pushed in 1.10.1

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.

2 participants