Here you can find the source of currentZonedDateTime()
public static ZonedDateTime currentZonedDateTime()
//package com.java2s; //License from project: Open Source License import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Calendar; public class Main { public static ZonedDateTime currentZonedDateTime() { Calendar now = Calendar.getInstance(); ZonedDateTime zdt = ZonedDateTime.ofInstant(now.toInstant(), ZoneId.systemDefault()); return zdt; }//from w ww.ja v a 2 s .c o m }