Skip to content

fix(export): write EXDATE as VALUE=DATE to produce valid iCal - #1264

Open
one-kash wants to merge 1 commit into
FossifyOrg:mainfrom
one-kash:fix/exdate-value-date
Open

fix(export): write EXDATE as VALUE=DATE to produce valid iCal#1264
one-kash wants to merge 1 commit into
FossifyOrg:mainfrom
one-kash:fix/exdate-value-date

Conversation

@one-kash

Copy link
Copy Markdown

Summary

Closes #1102.

Exported .ics files fail to import into strict iCalendar parsers (e.g. Radicale, Thunderbird) with an error like '20250429' is not a valid DATE-TIME on the EXDATE line.

Cause

repetitionExceptions are stored as date-only day codes (YYYYMMDD), but IcsExporter.fillIgnoredOccurrences wrote them as a bare EXDATE property:

EXDATE:20250429

Per RFC 5545 §3.8.5.1, EXDATE defaults to the DATE-TIME value type, so a date-only value is invalid.

Fix

Emit the VALUE=DATE parameter, matching the format the exporter already uses for all-day DTSTART/DTEND:

EXDATE;VALUE=DATE:20250429

IcsImporter.getTimestamp already handles the ;VALUE=DATE: form, so exported files continue to round-trip correctly.

Testing

The repo has no unit-test harness for IcsExporter (only instrumented androidTest exists), so this was verified by code inspection of the export format against RFC 5545 and the existing all-day DTSTART handling and import parser. Happy to add test scaffolding if desired.

repetitionExceptions are stored as date-only day codes (YYYYMMDD), but
were exported as a bare EXDATE property. Per RFC 5545 3.8.5.1, EXDATE
defaults to the DATE-TIME value type, so a date-only value is invalid
and rejected by strict parsers (e.g. Radicale, Thunderbird).

Emit EXDATE;VALUE=DATE:YYYYMMDD, matching the existing all-day DTSTART
format. The importer already handles the ;VALUE=DATE: form, so exported
files round-trip correctly.

Fixes FossifyOrg#1102
@one-kash
one-kash requested a review from naveensingh as a code owner July 31, 2026 01:58
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.

ics export EXDATE invalid date-time

1 participant