Java tutorial
import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; public class Main { public static void main(String[] args) { // Instant is useful for generating a time stamp to represent machine time. Instant timestamp = Instant.now(); // Convert "machine time" to human units LocalDateTime humanTime = LocalDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.println(humanTime); } }