Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

now() is an hour off

New Here ,
Mar 19, 2008 Mar 19, 2008
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?
506
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 19, 2008 Mar 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Mar 19, 2008 Mar 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2010 Mar 19, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources