Skip to main content
Participant
March 19, 2008
Question

now() is an hour off

  • March 19, 2008
  • 3 replies
  • 536 views
the now() function is an hour off.
the date on the server (RH5.x) is correct.
How do I get CF to recognize the server time?
    This topic has been closed for replies.

    3 replies

    Participating Frequently
    March 19, 2010

    I had this same problem and found a rather quick fix for it despite the hoops Adobe recommends.

    First, go into CF administrator and verify the Java VM version CF is using in CF system information.

    It should be above 1.3 for the following to work, otherwise you'll be forced to upgrade your JVM in the link below.

    http://kb2.adobe.com/cps/447/d2ab4470.html

    Next, go to the link and scroll down to the Alternative Solution - Sun JVM Hot Fix section and

    read the instructions.  next, go to this link: http://java.sun.com/javase/downloads/index.jsp#timezone

    and download the updater utility for Java (you will need to create an account with them to get the download).

    Once downloaded, unzip the file in a temp folder on the CF server, then follow the instructions found

    at this link: http://java.sun.com/javase/tzupdater_README.html

    However, you will need to browse to the JVM used by ColdFusion, which is generally found in the

    runtime/jre/bin folder to update its JVM engine.  example command shell command will look like this:

    [drive path to CF]/runtime/jre/bin/java -jar [drive path to updater]/tzupdater.jar -u

    you will need to restart the CF Server service afterwards for this to take effect.

    then run a test CFM page using Now() to see the result

    Participating Frequently
    March 19, 2008
    Assuming that you are in an area that went to daylight savings time, perhaps it is the time change issue. These threads may give you a place to start if it is.

    CF7 NOT PICKING NEW SERVER TIME

    ColdFusion MX/JRun and Sun's JVM: U.S. Daylight Saving Time changes in 2007

    Phil
    Inspiring
    March 19, 2008
    get all your computers to do daylight savings time the same way. CF gets the value of now() from whatever computer it's running on.