Getting the TimeZone Name
May 11, 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)
Tweet
Trackbacks
Trackback Address: 132/A940471F18A79C5BB7709BDE5A07FA4C
Comments
On 05/11/2004 at 3: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 6: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 5: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 11: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
- Nginx redirect www to non www domain
- HashDOS and ColdFusion
- HackMyCF Updated for APSB11-29 Security Hotfix
- Adobe eSeminar on FuseGuard
- Determining Which Cumulative Hotfixes are Installed on ColdFusion
- Adding Two Factor Authentication to ColdFusion Administrator
- ColdFusion Developer Week at Adobe.com
- Bug Loading Scripts for CFFileUpload and CFMediaPlayer


add to del.icio.us



