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

Unable to parse ics file with VTIMEZONE #218

Open
ddui opened this issue Feb 28, 2017 · 1 comment
Open

Unable to parse ics file with VTIMEZONE #218

ddui opened this issue Feb 28, 2017 · 1 comment
Assignees

Comments

@ddui
Copy link

ddui commented Feb 28, 2017

When trying to pass the following .ics

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//TEST//TEST//EN
BEGIN:VTIMEZONE
TZID:UTC+11
BEGIN:STANDARD
DTSTART;VALUE=DATE:20170101
TZNAME:UTC+11
TZOFFSETFROM:+1100
TZOFFSETTO:+1100
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION:TESTING
DTEND;TZID=UTC+11:20170228T233000
DTSTAMP:20170227T064302Z
DTSTART;TZID=UTC+11:20170228T230000
RESOURCES:Court 4
SEQUENCE:0
STATUS:Confirmed
SUMMARY:TESTIN
UID:1961094_636238800000000000
END:VEVENT
END:VCALENDAR

If I remove the VTIMEZONE section the file parses perfectly well. If I dont, when "walk"ing through events the DTSTART= none and DTEND = none

When I do a print (event['DTSTART'].dt) I get back AttributeError: 'NoneType' object has no attribute 'dt'

Unfortunately, I cant get the source ics file changed.

@geier geier self-assigned this Apr 18, 2017
@geier
Copy link
Collaborator

geier commented May 26, 2017

The issue here is that the VTIMEZONE subcomponent's DTSTART is a date, not a datetime. In most cases we currently don't support invalid VCALENDARs.

Some error reporting would be nice in any case,

Quote from RFC 5545:

  The mandatory "DTSTART" property gives the effective onset date
  and local time for the time zone sub-component definition.
  "DTSTART" in this usage MUST be specified as a date with a local
  time value.

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

2 participants