# 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 - [ ] Task: Integrate `rrule` library - [ ] Add `rrule` to `deno.json` imports - [ ] Verify import works in a simple script - [ ] Task: Implement Recurring Event Expansion - [ ] Write failing tests for `expandRecurrences` - [ ] Implement `expandRecurrences` in `icalendar.ts` - [ ] Task: Implement EXDATE support - [ ] Write failing tests for EXDATE exclusion - [ ] Update `expandRecurrences` to handle `EXDATE` - [ ] Task: Implement Status Filtering - [ ] Write failing tests for filtering "CANCELLED" events - [ ] Update sync logic to filter based on iCalendar status - [ ] Task: Conductor - User Manual Verification 'Phase 3: Features' (Protocol in workflow.md) ## Phase 4: Cleanup & Configuration - [ ] Task: Remove obsolete configuration - [ ] Write failing tests verifying `tzShift` is ignored/deprecated - [ ] Remove `tzShift` and `hourShift` from `getSources` and `fetchAndParseCalendar` - [ ] Task: Add `syncWindowDays` configuration - [ ] Write failing tests for configurable expansion window - [ ] Implement `syncWindowDays` in config and sync logic - [ ] Task: Conductor - User Manual Verification 'Phase 4: Cleanup & Configuration' (Protocol in workflow.md)