Closed sven-geisenhainer closed 4 years ago
It's been a while, but...
I am not able to reproduce this. Your JVM's default timezone isn't different from the timezone defined in the iCal file, is it?
Because the event starts in July, that means its UTC offset should be +2:00, correct? Which means the start time of the event should be 10:00 UTC and the end time should be 11:00 UTC.
The following unit test passes for me. "issue85.ical" contains your iCalendar data verbatim and "issue85-1980.ical" is the same, but with DAYLIGHT's DTSTART set to "19800101T000000"
@Test
public void test() throws Exception {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
String files[] = { "issue85.ical", "issue85-1980.ical" };
for (String file : files) {
ICalendar ical = Biweekly.parse(new File(file)).first();
VEvent event = ical.getEvents().get(0);
assertEquals("2018-07-22T10:00:00", df.format(event.getDateStart().getValue()));
assertEquals("2018-07-22T11:00:00", df.format(event.getDateEnd().getValue()));
}
}
I also cannot reproduce this anymore (v0.6.3) - obviously the issue has already been fixed. Thank you for investigating and keep the good work going!
Thanks!
Outlook 16.0 generated iCalendars might use very old DTSTART property values for VTIMEZONE observance rrules, e.g.:
BEGIN:VTIMEZONE BEGIN:DAYLIGHT DTSTART:16010325T020000 ... END:DAYLIGHT ... END:VTIMEZONE
biweekly seems to stick to the STANDARD observance rrule if the DAYLIGHT rrule starts before 1919-01-01.
Complete example (test.ics generated by Outlook 16.0, irrelevant properties removed):
Test programm:
Output:
Start: Sun Jul 22 13:00:00 CEST 2018 End: Sun Jul 22 14:00:00 CEST 2018
Changing the DAYLIGHT rrules DTSTART property value to a more recent date e.g. 19800101T000000 fixes the issue.