Java Data Type How to - Get ZonedDateTime from specific Calendar


We would like to know how to get ZonedDateTime from specific Calendar.


//ww w  . j a v  a  2s . c o m
import java.time.ZonedDateTime;
import java.util.GregorianCalendar;

public class Main {
    public static void main(String[] args) {
      // ZonedDateTime from specific Calendar
      ZonedDateTime gregorianCalendarDateTime = new GregorianCalendar()

The code above generates the following result.