Java tutorial
import java.time.ZoneId; import java.util.Date; public class Main { public static void main(String[] argv) { System.out.println(new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate()); } }