Closed jkwatson closed 8 years ago
Hi John,
Thanks for posting this. biweekly only uses the createDateIterator(RecurrenceIterator rit)
method (line 96 of the RecurrenceProperty
class), so it looks like there's nothing to worry about from biweekly's perspective. Thanks for alerting me to the problem though.
The code in the com.google.ical
package comes from the google-rfc-2445 project, so you may want to report the issue to them. However, I'm pretty sure the project is inactive :( . The project is not hosted on Maven Central, which is why I put its source code in with biweekly's source code.
I think you might be the sole maintainer of the com.google.ical
package now. :) Thanks for the response. In my project, I just need the recurrence rule processing, rather than the whole iCal processing, so I've only been using the stuff in com.google.ical
. I'm working around this issue now, just fine, so if you want to leave the com.google.ical
sleeping dog lie, then that's definitely your prerogative.
I may take some time to get this fixed, and if I do, I will definitely provide a PR for you.
I think you might be the sole maintainer of the com.google.ical package now. :)
Gee thanks, I'm honored. -_-
I may take some time to get this fixed, and if I do, I will definitely provide a PR for you.
I would appreciate it, thank you.
The method:
claims it will use the timezone to interpret the
start
parameter, but it does not actually do that. The GregorianCalendar that is created indateToDateValue
is hard-coded to UTC, and thus thestart
parameter is not properly handled if the tzid is not UTC.The following unit test shows the issue:
I believe that the RecurrenceIteratorWrapper and the RecurrenceIterableWrapper need to store the timezone, and use it when converting between internal date formats and
java.util.Date
s. The only method I'm not sure about ispublic static DateIterator createDateIterator(RecurrenceIterator rit)
, which would then require a timezone parameter, although adding one does not work properly.As a work-around, I'm explicitly using
createDateIterator(createRecurrenceIterator(rrule, start, timeZone, true))
and manually building the DateValue using the correct time zone for the start date.Note: This unit test can be used to verify that
public static DateIterator createDateIterator(RecurrenceIterator rit)
continues to work correctly, with any changes that are made.