XMLGregorianCalendar to LocalDateTime
Something like :

xgc.toGregorianCalendar().toZonedDateTime().toLocalDateTime() ?


If you don't want to just rip off the zone information, but instead get the local time at UTC :

ZonedDateTime utcZoned = xgc.toGregorianCalendar().toZonedDateTime().withZoneSameInstant(ZoneId.of("UTC"));
LocalDateTime ldt = utcZoned.toLocalDateTime();


This answer is from the guy who has written the java.time specifications and implemented them btw : https://stackoverflow.com/questions/29767084/convert-between-localdate-and-xmlgregoriancalendar