time
-
Date와 TimeJAVA/JAVA8 관련 2022. 5. 15. 17:12
기계적인 시간과 인류용 시간 표현방법 1. 기계적인 시간 Instant.now(): 현재 UTC (GMT)를 리턴한다. Universal Time Coordinated == Greenwich Mean Time public class MachineTime { public static void main(String[] args) { Instant instant = Instant.now();//기준 시 UTC (GMT) System.out.println("Instant :: " + instant); ZoneId zone = ZoneId.systemDefault(); System.out.println("Zone :: " + zone); ZonedDateTime zonedDateTime = instant.atZo..