Java tutorial
import java.time.Clock; import java.time.LocalDateTime; public class Main { public static void main(String[] args) { // Current Time Clock clock = Clock.systemUTC(); System.out.println(Clock.systemDefaultZone()); LocalDateTime dateAndTime = LocalDateTime.now(clock); System.out.println(dateAndTime); System.out.println(LocalDateTime.now()); } }