Created
June 1, 2016 03:16
-
-
Save quest4i/d745f1acb6491af341d4e9aa38610503 to your computer and use it in GitHub Desktop.
자바8에서 간단하게 UTC를 가지고 다른 시간대를 표현할 수 있다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZonedDateTime utcTime = ZonedDateTime.now(ZoneId.of("UTC")); | |
System.out.println("협정 세계시 : " + utcTime); | |
ZonedDateTime seoulTime = utcTime.withZoneSameInstant(ZoneId.of("Asia/Seoul")); | |
System.out.printf("Seoul : " + seoulTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment