setTimezone

Change the timezone defintion for the current request

setTimezone(timezone) → returns string

This function requires Lucee. Not supported on Adobe ColdFusion.

setTimezone Argument Reference

timezone string
Required

Examples sample code invoking the setTimezone function


Change Timezone from UTC to CET

writeOutput(toString(getTimezoneInfo().id));
setTimezone("CET");
writeOutput("→ "&toString(getTimezoneInfo().id));

Expected Result: Etc/UTC→ CET


Fork me on GitHub