-
Notifications
You must be signed in to change notification settings - Fork 232
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
Error parsing VTIMEZONES from tzurl.org #102
Comments
The simplified versions for Outlook, e.g. http://tzurl.org/zoneinfo-outlook/Europe/Berlin.ics are working. |
In the future, please post a code snippet that shows how the error occurred instead of just a stack trace. I assume you're doing something like: const string berlin = "http://tzurl.org/zoneinfo/Europe/Berlin.ics";
var calendar = Calendar.LoadFromStream(new StringReader(berlin)); This isn't valid. You will have to download the contents of that URL, and then pass the ics contents as a string. The wiki has some examples of how to download a calendar, and then parsing the ics string. ical.net will never support downloading resources from URLs. You will have to do that from within your application. The reasons for that are at the wiki section I linked above. |
nope downloaded via httpclient or webclient and passed the string. problem is the utc offset with seconds I believe. Can post the code when I have access to the pc later. |
Yeah, behind the scenes, it's using the Historically, dday.ical's original implementation used regex's to parse the offset, but it didn't work in some normal use cases (like if you prefixed a positive offset with a |
true a lot of redundant code in dday.ical :) still need me to find the code snippet or can you reproduce it? |
I can reproduce it, but I'm not going to fix it. It's a .NET library. It seems reasonable to use .NET conventions when they match the behavior of the BCL. |
But since a lot of clients use that timezone definitions (Davdroid for example) the library shouldn't crash when loading a valid ics file or? |
My time isn't unlimited. :) I'm not going to re-implement offset parsing to catch some corner case that could reasonably be caught by the client. There are no time zones that have resolutions smaller than 15 minute intervals. The quick and dirty alternative it to see if there is more than one |
Ok will look into it in more detail, relevant code is in UTCOffsetSerializer.cs, right? |
actually according to the rfc 5545
there are no |
Fix published in nuget version 2.2.32: |
When trying to load a timezone with Calendar.LoadFromStream() from tzurl.org, e.g. http://tzurl.org/zoneinfo/Europe/Berlin.ics
I get the following exception
The text was updated successfully, but these errors were encountered: