Whatever message this page gives is out now! Go check it out!

ClearTimeZone

Last update:
May 18, 2026
DESCRIPTION
Clears the time zone that you'd set.
RETURNS
Nothing
SYNTAX
clearetTimeZone()
HISTORY
New in ColdFusion (2021 release)
EXAMPLE
Application.cfc
component 

  this.name="TimeZone_func"; 
  this.timeZone="Japan"; 
}
clearTimeZone.cfm
<cfscript> 
 javatz = CreateObject("java", "java.util.TimeZone"); 
 tz_list = javatz.getAvailableIDs(); // get a list of all timezone supplied by java util. 
 //writedump(tz_list); 
    for( i=1; i LTE arrayLen(tz_list); i++) 
 { 
    setTimeZone(tz_list[i]); 
    writeoutput(getTimeZone().timezone); 
 } 
 clearTimezone(); 
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page