Hey all - we just upgraded to ColdFusion 9 on both a development and production server and everything seems to be running pretty smoothly, with one exception. The weird thing is that time stamps generated by #DateFormat(Now(), "[mask]")# on development are correct but the same line of code running in production produces a time output string exactly 10 hours later! What makes it weirder is that the physical Windows 2003 server the CF9 server is running shows the proper date stamp and time zone. Is there some offset adjustment setting buried in the configuration somewhere that needs to be re-calibrated? It's kind of frustrating, as we didn't experience this problem prior to the upgrade and the dev server seems to be chugging along normally with the time stamps. Any info appreciated...
Well, I figured out what happened, in case anyone else has the same problem in the future. It seems that the Java Runtime Environment has its own clock that ColdFusion derives its timestamps from (for whatever reason - I really hate Java). Unless it is precisely set, it will render any timestamps as it sees fit. In my case, it thought my server was in "Asia/Karachi". Go figure... Anyways, in the CF admin tool, go to "Server Settings > Java and JVM". In the "JVM Arguments" text box, add the following text to the virtual machine parameter string: "-Duser.timezone=GMT-5" or any plus/minus figure to match your locale - in my case, EST. Restart the ColdFusion 9 Application Server in the Services control panel and voila! Correct time has returned and all is well again. Did I mention I really hate Java?