View Full Version : ColdFusion - Change display time - add 1 hour

May 27th, 2009, 08:46 AM
The Hostek.com servers are based on Central Time. If you are in a different time zone, you may need to adjust the time that the server returns. Here is a sample line of code that will display the server time, plus 1 hour.

<CFOUTPUT>#TimeFormat(DateAdd("h", 1, Now()))#</CFOUTPUT>

If you need to subtract an hour you would do:

<CFOUTPUT>#TimeFormat(DateAdd("h", -1, Now()))#</CFOUTPUT>