Getting the TimeZone Name
CFML's function GetTimeZoneInfo will give you timezone offsets, and day light savings time information, but if you want the name of the timezone your ColdFusion server is in you can use java's TimeZone class:
<cfset tz = CreateObject("java", "java.util.TimeZone")> <cfset tz = tz.getDefault()> <cfoutput>TimeZone: #tz.getDisplayName()# (#tz.getID()#)</cfoutput>
The output when I run it is:
TimeZone: Eastern Standard Time (America/New_York)
Like this? Follow me ↯Tweet Follow @pfreitag
Getting the TimeZone Name was first published on May 10, 2004.
The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.