Skip to content

Instantly share code, notes, and snippets.

@shvahabi
Created May 31, 2022 22:37
Show Gist options
  • Select an option

  • Save shvahabi/38f388a33447b1b279b1c14bc790322d to your computer and use it in GitHub Desktop.

Select an option

Save shvahabi/38f388a33447b1b279b1c14bc790322d to your computer and use it in GitHub Desktop.
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)
@shvahabi
Copy link
Author

:~$ gh gist clone https://gist.github.com/38f388a33447b1b279b1c14bc790322d
:~$ cd 38f388a33447b1b279b1c14bc790322d/
:~$ scala-cli time.sc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment