Here you can find the source of toCalendar(final LocalDateTime localDateTime)
public static Calendar toCalendar(final LocalDateTime localDateTime)
//package com.java2s; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { /**/*www . jav a 2 s . c om*/ * Converts local date time to Calendar. */ public static Calendar toCalendar(final LocalDateTime localDateTime) { return GregorianCalendar.from(ZonedDateTime.of(localDateTime, ZoneId.systemDefault())); } }