use of biweekly.io.TimezoneInfo in project substitution-schedule-parser by vertretungsplanme.
the class BaseIcalParser method getTimeZoneStart.
private TimeZone getTimeZoneStart(ICalendar ical, VEvent event) {
if (event.getDateStart() == null) {
return null;
}
TimezoneInfo tzinfo = ical.getTimezoneInfo();
TimeZone timezone;
if (tzinfo.isFloating(event.getDateStart())) {
timezone = TimeZone.getDefault();
} else {
TimezoneAssignment dtstartTimezone = tzinfo.getTimezone(event.getDateStart());
timezone = (dtstartTimezone == null) ? TimeZone.getTimeZone("UTC") : dtstartTimezone.getTimeZone();
}
return timezone;
}
Aggregations