Skip to content

Instantly share code, notes, and snippets.

@frankvilhelmsen
Last active August 29, 2015 14:22
Show Gist options
  • Save frankvilhelmsen/79706c3b3d8f53758d4e to your computer and use it in GitHub Desktop.
Save frankvilhelmsen/79706c3b3d8f53758d4e to your computer and use it in GitHub Desktop.
java.text.SimpleDateFormat dataformat = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sss'Z'");
dataformat.setTimeZone(TimeZone.getTimeZone("Europe/Copenhagen")); // locale time
println dataformat.format(new Date())
dataformat.setTimeZone(TimeZone.getTimeZone("UTC")); // zulu time
println dataformat.format(new Date())​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment