Created
May 31, 2022 22:37
-
-
Save shvahabi/38f388a33447b1b279b1c14bc790322d to your computer and use it in GitHub Desktop.
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
| import java.time._ | |
| import java.time.format.DateTimeFormatter | |
| val formatter = DateTimeFormatter.ofPattern("uuuu/MM/dd HH:mm:ss.n X") | |
| val time = Instant.now.atOffset(ZoneOffset.ofHoursMinutes(0, 30)).format(formatter) | |
| println(time) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:~$ gh gist clone https://gist.github.com/38f388a33447b1b279b1c14bc790322d:~$ cd 38f388a33447b1b279b1c14bc790322d/:~$ scala-cli time.sc