Accessibility
Adobe
Sign in My orders My Adobe

Title

Working with daylight savings time in ColdFusion MXProducts affected

The current time is calculated correctly in Macromedia ColdFusion MX and higher, regardless of whether the Automatically Adjust Clock for Daylight Saving Changes option is enabled or disabled in the computer's Control panel Date/Time Properties. In previous versions of ColdFusion, the current time would be offset by one hour when this option was disabled.

Background information
The Automatically Adjust Clock for Daylight Saving Changes option does not switch daylight saving time on or off on the computer. It only controls whether a user or the computer itself adjusts the time for daylight saving for Windows programs:

  • Enable this option when you want your computer's clock to automatically adjust for daylight saving time.
  • Disable this option when you want a user to make the adjustment for daylight saving time.

Note: You can also select a time zone with or without daylight saving time in the Control panel Date/Time Properties. For example (GMT) Casablanca, Monrovia does not support daylight saving time but (GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London does.

Working with Java time zones
Because the Control Panel Date/Time Properties setting doesn't effect ColdFusion MX applications and because ColdFusion MX is built on top of Java, there are a variety of time zones available for you to reference in your ColdFusion MX pages.

Run the following code to view a full listing of Java time zones available for you to use in your ColdFusion MX applications:

 <cfobject action="CREATE"  type="JAVA" outputclass="java.util.SimpleTimeZone"   name="otz"><cfset TZlist = oTZ.getAvailableIDs() ><!--- List of TZs available   ---><cfoutput><h2>Available TimeZones</h2><table><th >name</th><th>offset</th><th>dst</th><cfloop index="i"    from="1" to="#ArrayLen(TZlist)#"><cfset q = oTZ.getTimeZone(TZlist[i])><!--- TimeZone object ---><tr><td>#TZlist[i]#</td><td>#(q.getRawOffset()/3600000)# </td><td>#q.useDaylightTime()#</td></tr></cfloop></table></cfoutput> 



Doc ID
(tn_18310)

Last updated
2005-05-13

Products affected

Contacting Adobe Support

Still need help?
Find out about all your support options.
Contact support