Skip to content

Instantly share code, notes, and snippets.

@aliaspooryorik
Created March 16, 2016 22:06
Show Gist options
  • Save aliaspooryorik/6fce5aa8df73b0a78e4d to your computer and use it in GitHub Desktop.
Save aliaspooryorik/6fce5aa8df73b0a78e4d to your computer and use it in GitHub Desktop.
java.time
<cfscript>
LSDateTime = createObject("java", "java.time.LocalDateTime");
Zone = createObject("java", "java.time.ZoneId");
writeDump("localTime: " & LSDateTime.now().toString());
writeDump("London Time:] " & LSDateTime.now(Zone.of("Europe/London")).toString());
writeDump("Kolkata Time:] " & LSDateTime.now(Zone.of("Asia/Kolkata")).toString());
WriteDump(Zone.systemDefault().getId());
//WriteDump(Zone.toString());
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment