Getting the TimeZone Name
May 10, 2004
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)
Trackbacks
Trackback Address: 132/A940471F18A79C5BB7709BDE5A07FA4C
Comments
On 05/11/2004 at 1:45:22 AM EDT paulH wrote:
1
you might find this thing useful: http://www.macromedia.com/cfusion/exchange/index.cfm?view=sn130#loc=en_us&view=sn106&viewName=Exchange%20Search%20Details&authorid=30822818&page=0&scrollPos=0&subcatid=0&snid=sn106&itemnumber=6&extid=1007983&catid=0
On 01/14/2006 at 4:01:00 PM EST Jake wrote:
2
Any idea how to (easily) find the abbreviations for the timezones... i.e. "CST" or "PST"?
On 04/19/2007 at 3:04:41 AM EDT Reinhard Jung wrote:
3
Hi Pete
very cool!!! I'll changed it a little and posted it on my own swiss blog. With a Link to your Entry, shurely.
You can see it here: http://www.landstrasse.ch/index.cfm/2007/4/19/TimeZone
On 10/22/2009 at 9:30:05 PM EDT Maxx60 wrote:
4
You may also want to find another surgeon to get a second opinion, to confirm if surgery is the right treatment for you. ,
Post a Comment
Recent Entries
- Cache Template in Request Setting Explained
- What Version of Java is ColdFusion Using?
- ColdFusion 9 Performance Brief from Adobe
- Request Filtering in IIS 7 Howto
- J2EE Session Cookies on ColdFusion / JRun
- Hands on ColdFusion Security Training
- ColdFusion 9 Solr Vulnerability - Are you at Risk?
- FCKEditor Year 2010 Bug for Firefox 3.6 with ColdFusion
very cool!!! I'll changed it a little and posted it on my own swiss blog. With a Link to your Entry, shurely.
You can see it here: http://www.landstrasse.ch/index.cfm/2007/4/19/TimeZone



add to del.icio.us



