The attached iCalendar file contains an all-day event (the DTSTART is a "date" as opposed to a "date/time"). When outputting its dates generated by a recurrence iterator, the dates have a time component. But they should not have time components because it is an all-day event.
Code:
ICalReader reader = new ICalReader(new File("Test_obalqpctbh1c4f66r683opue5g@group.calendar.google.com.ics"));
ICalendar ical = reader.readNext();
VEvent event = ical.getEvents().get(1);
System.out.println("Start: " + event.getDateStart().getValue());
DateIterator iterator = event.getDateIterator(TimeZone.getDefault());
int count = 0;
while (iterator.hasNext()) {
if (++count == 10) break;
final Date date = iterator.next();
System.out.println(date);
}
Output:
Start: Mon Jun 06 00:00:00 EDT 2016
Sun Jun 05 20:00:00 EDT 2016
Sun Jun 19 20:00:00 EDT 2016
Sun Jul 03 20:00:00 EDT 2016
Sun Jul 17 20:00:00 EDT 2016
Sun Jul 31 20:00:00 EDT 2016
Sun Aug 14 20:00:00 EDT 2016
Sun Aug 28 20:00:00 EDT 2016
Sun Sep 11 20:00:00 EDT 2016
Sun Sep 25 20:00:00 EDT 2016
The attached iCalendar file contains an all-day event (the DTSTART is a "date" as opposed to a "date/time"). When outputting its dates generated by a recurrence iterator, the dates have a time component. But they should not have time components because it is an all-day event.
Code:
Output:
Test_obalqpctbh1c4f66r683opue5g@group.calendar.google.com.ics.txt