Skip to content

Instantly share code, notes, and snippets.

@dwijnand
Last active September 7, 2016 22:43
Show Gist options
  • Save dwijnand/0f1d14529923756f8fb8 to your computer and use it in GitHub Desktop.
Save dwijnand/0f1d14529923756f8fb8 to your computer and use it in GitHub Desktop.
nowIso8601 without JodaTime
def nowIso8601() = {
val df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
df setTimeZone (java.util.TimeZone getTimeZone "UTC")
df format new java.util.Date()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment