# Implementation Plan: Proper Timezone Handling & Recurring Events ## Phase 1: Foundation - Timezone Mapping & Resolver [checkpoint: b8bf269] - [x] Task: Setup Timezone Map (WINDOWS_TO_IANA) - [x] Write failing tests for `resolveIanaName` - [x] Implement `WINDOWS_TO_IANA` mapping and `resolveIanaName` in `timezones.ts` - [x] Task: Implement UTC Offset Resolver using Intl - [x] Write failing tests for `getUtcOffsetMs` - [x] Implement `getUtcOffsetMs` in `timezones.ts` - [x] Task: Conductor - User Manual Verification 'Phase 1: Foundation' (Protocol in workflow.md) ## Phase 2: Core Logic - Extraction & Shifting [checkpoint: 10a6db5] - [x] Task: Fix Wall-Clock Extraction logic - [x] Write failing tests for `resolveEventStart` (mocking `Intl` if necessary) - [x] Implement `resolveEventStart` in `icalendar.ts` to handle local time ground truth - [x] Task: Conductor - User Manual Verification 'Phase 2: Core Logic' (Protocol in workflow.md) ## Phase 3: Features - Recurring Events & Filtering [checkpoint: ffaef28] - [x] Task: Integrate `rrule` library - [x] Add `rrule` to `deno.json` imports - [x] Verify import works in a simple script - [x] Task: Implement Recurring Event Expansion - [x] Write failing tests for `expandRecurrences` - [x] Implement `expandRecurrences` in `icalendar.ts` - [x] Task: Implement EXDATE support - [x] Write failing tests for EXDATE exclusion - [x] Update `expandRecurrences` to handle `EXDATE` - [x] Task: Implement Status Filtering - [x] Write failing tests for filtering "CANCELLED" events - [x] Update sync logic to filter based on iCalendar status - [x] Task: Conductor - User Manual Verification 'Phase 3: Features' (Protocol in workflow.md) ## Phase 4: Cleanup & Configuration [checkpoint: 533c240] - [x] Task: Remove obsolete configuration - [x] Write failing tests verifying `tzShift` is ignored/deprecated - [x] Remove `tzShift` and `hourShift` from `getSources` and `fetchAndParseCalendar` - [x] Task: Add `syncWindowDays` configuration - [x] Write failing tests for configurable expansion window - [x] Implement `syncWindowDays` in config and sync logic - [x] Task: Conductor - User Manual Verification 'Phase 4: Cleanup & Configuration' (Protocol in workflow.md)