Java tutorial
import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; public class Main { public static void main(String[] argv) { LocalDate today = LocalDate.now(); LocalTime time = LocalTime.now(); LocalDateTime timeWithDate = LocalDateTime.now(); System.out.println("today = " + today); System.out.println("local date with time now = " + timeWithDate); System.out.println("time = " + time); } }