setTimezone

Change the timezone definition for the current request

setTimezone(timezone) → returns string

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

setTimezone Argument Reference

timezone string
Required

Examples sample code invoking the setTimezone function

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

Expected Result: Etc/UTC→ CET


Fork me on GitHub