Skip to content

Instantly share code, notes, and snippets.

@nakaly
Last active January 12, 2017 19:33
Show Gist options
  • Save nakaly/b159a8c63d80cecc3cb3fb0a2548d6f7 to your computer and use it in GitHub Desktop.
Save nakaly/b159a8c63d80cecc3cb3fb0a2548d6f7 to your computer and use it in GitHub Desktop.
ZonedDateTime.toString()
jshell> ZonedDateTime.of(2017, 1, 13, 4, 21, 15, 100_000_000, ZoneId.systemDefault()).toString()
$6 ==> "2017-01-13T04:21:15.100+09:00[Asia/Tokyo]"
jshell> ZonedDateTime.of(2017, 1, 13, 4, 21, 15, 000_000_000, ZoneId.systemDefault()).toString()
$7 ==> "2017-01-13T04:21:15+09:00[Asia/Tokyo]"
jshell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment