Skip to content

fix: use UTC methods in iCal all-day date formatting#219

Open
edvintb wants to merge 1 commit intoavihaymenahem:mainfrom
edvintb:fix/ical-allday-utc
Open

fix: use UTC methods in iCal all-day date formatting#219
edvintb wants to merge 1 commit intoavihaymenahem:mainfrom
edvintb:fix/ical-allday-utc

Conversation

@edvintb
Copy link
Copy Markdown
Contributor

@edvintb edvintb commented Mar 12, 2026

Summary

  • formatDateOnly() used local time methods (getDate, getMonth, getFullYear), causing all-day CalDAV events to be off by one day in negative UTC offset timezones
  • Switched to UTC methods (getUTCFullYear, getUTCMonth, getUTCDate)

Test plan

  • Existing icalHelper.test.ts all-day event test now passes (30/30 tests green)

🤖 Generated with Claude Code

@edvintb edvintb requested a review from avihaymenahem as a code owner March 12, 2026 17:44
formatDateOnly used local time methods (getDate/getMonth/getFullYear),
causing all-day events to be off by one day in negative UTC offset timezones
when the input is a UTC midnight timestamp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@edvintb edvintb force-pushed the fix/ical-allday-utc branch from 8cb8688 to ff9ba9e Compare March 15, 2026 00:05
@edvintb
Copy link
Copy Markdown
Contributor Author

edvintb commented Mar 15, 2026

Hey! Quick bump on this one — it's a 3-line fix for all-day events showing on the wrong date in negative UTC offsets. Would love to get it in when you have a sec 🙏

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.

1 participant