Skip to content

Instantly share code, notes, and snippets.

@tomchiverton
Last active May 5, 2020 15:57
Show Gist options
  • Save tomchiverton/635b007d9cdb18a020257fdfde570a60 to your computer and use it in GitHub Desktop.
Save tomchiverton/635b007d9cdb18a020257fdfde570a60 to your computer and use it in GitHub Desktop.
<cfscript>
currentLocale = getLocale();
setLocale(currentLocale);
writeOutput("Original: ");
writeDump(getLocale());
writeDump(now());
writeDump(DateTimeFormat(now(),'d MMM yyyy - HH:nn'));
writeDump(DateTimeFormat(now(),'d MMM yyyy - HH:nn','Europe/London'));
test = createdatetime(2020,01,05,15,50,55);
writeDump(test);
writeDump(DateTimeFormat(test,'d MMM yyyy - HH:nn'));
writeDump(DateTimeFormat(test,'d MMM yyyy - HH:nn','Europe/London'));
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment