Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_attrs errors when dtstart/dtend are before epoch start #62

Open
JamesS-M opened this issue Feb 23, 2022 · 0 comments
Open

parse_attrs errors when dtstart/dtend are before epoch start #62

JamesS-M opened this issue Feb 23, 2022 · 0 comments

Comments

@JamesS-M
Copy link

I'm parsing a calendar with a few events similar to:

BEGIN:VEVENT
DTSTART;TZID=Atlantic/Reykjavik:19681118T080000
DTEND;TZID=Atlantic/Reykjavik:19681119T080000
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYMONTHDAY=18
DTSTAMP:20220223T132344Z
UID:040000008200E00074C5B7101A82E008000000009006137E4556CC01000000000000000
 0100000004DE18BB12CC06E4EBCC69C34D47CBB23
CREATED:20110809T103650Z
DESCRIPTION:<!-- Converted from text/plain format -->
LAST-MODIFIED:20211118T194526Z
LOCATION:
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY:foobar
TRANSP:TRANSPARENT
CATEGORIES:http://schemas.google.com/g/2005#event
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:This is an event reminder
TRIGGER:-P0DT0H30M0S
END:VALARM
END:VEVENT
BEGIN:VEVENT
DTSTART:19660809T070000Z
DTEND:19660810T070000Z
RRULE:FREQ=YEARLY;UNTIL=20140809T070000Z;BYMONTH=8;BYMONTHDAY=9
DTSTAMP:20220223T132344Z
UID:040000008200E00074C5B7101A82E00800000000106972824556CC01000000000000000
 0100000007148A65B6CED4F40923DCD9292314A26
CREATED:20110809T103715Z
DESCRIPTION:
LAST-MODIFIED:20150727T163054Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:foobar
TRANSP:TRANSPARENT
CATEGORIES:http://schemas.google.com/g/2005#event
END:VEVENT

Both of these events throw the following error, presumably because they're before unix epoch.

(CaseClauseError) no case clause matching: {:error, "Expected end of input at line 1, column 23"}
lib/icalendar/util/deserialize.ex:88: ICalendar.Util.Deserialize.parse_attr/2

Any thoughts on how to handle such old events?

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

No branches or pull requests

1 participant