fix(export): write EXDATE as VALUE=DATE to produce valid iCal - #1264
Open
one-kash wants to merge 1 commit into
Open
fix(export): write EXDATE as VALUE=DATE to produce valid iCal#1264one-kash wants to merge 1 commit into
one-kash wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1102.
Exported
.icsfiles fail to import into strict iCalendar parsers (e.g. Radicale, Thunderbird) with an error like'20250429' is not a valid DATE-TIMEon theEXDATEline.Cause
repetitionExceptionsare stored as date-only day codes (YYYYMMDD), butIcsExporter.fillIgnoredOccurrenceswrote them as a bareEXDATEproperty:Per RFC 5545 §3.8.5.1,
EXDATEdefaults to theDATE-TIMEvalue type, so a date-only value is invalid.Fix
Emit the
VALUE=DATEparameter, matching the format the exporter already uses for all-dayDTSTART/DTEND:IcsImporter.getTimestampalready handles the;VALUE=DATE:form, so exported files continue to round-trip correctly.Testing
The repo has no unit-test harness for
IcsExporter(only instrumentedandroidTestexists), so this was verified by code inspection of the export format against RFC 5545 and the existing all-dayDTSTARThandling and import parser. Happy to add test scaffolding if desired.