I have an iCalendar string with 1 VCALENDAR component that contains 1 VTIMEZONE component. I am attempting to use Biweekly to parse the string and retrieve the TZID from the VTIMEZONE. However, after the string is parsed, in StreamReader.readNext, there is a call to handleTimezones. This call removes all VTIMEZONE components from the ICalendar object. It keeps the information on the reader, however the reader is not accessible through a call to Biweekly.parse. Essentially, I cannot get the timezone component I'm after. Why does Biweekly behave this way? What workarounds are available?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In an effort to "purify" the iCalendar data model, biweekly drops the VTIMEZONE components because they are only needed to carry the timezone information for the iCalendar's date/time values. biweekly automatically uses the information in the VTIMEZONE components to properly convert all the date/time values from their respective timezones to UTC (which is how Java's "Date" object stores date/time values).
But you can still access them if you really need to (as shown above). :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2015-06-09
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have an iCalendar string with 1 VCALENDAR component that contains 1 VTIMEZONE component. I am attempting to use Biweekly to parse the string and retrieve the TZID from the VTIMEZONE. However, after the string is parsed, in StreamReader.readNext, there is a call to handleTimezones. This call removes all VTIMEZONE components from the ICalendar object. It keeps the information on the reader, however the reader is not accessible through a call to Biweekly.parse. Essentially, I cannot get the timezone component I'm after. Why does Biweekly behave this way? What workarounds are available?
Ah, yes. You cannot access the parsed VTIMEZONE components if you are using "Biweekly.parse()". You will need to use the "ICalReader" class instead:
In an effort to "purify" the iCalendar data model, biweekly drops the VTIMEZONE components because they are only needed to carry the timezone information for the iCalendar's date/time values. biweekly automatically uses the information in the VTIMEZONE components to properly convert all the date/time values from their respective timezones to UTC (which is how Java's "Date" object stores date/time values).
But you can still access them if you really need to (as shown above). :)
Thank you!