471,573 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,573 software developers and data experts.

Where does Now() get the date/time?

219 100+
I was under the impression that the Now() function retrieved the date/time from the server running coldfusion, but that doesn't seem to be the case. Ever since the time change my server shows for example: 1:40pm but when I look at the output of the Now() function I'm getting 12:40pm.

Any ideas on how to fix this?
Mar 11 '08 #1

✓ answered by dmorand

Perhaps you need to look into getTimeZoneInfo().
I figured it out. I had upgraded to JVM 1.4.2_11 when I was running CF 6, but then I upgraded to CF 7 and it changed my path to the JVM. I swapped it back, and all is well now.

http://www.adobe.com/go/d2ab4470

7 10761
acoder
16,027 Expert Mod 8TB
According to the documentation, it is from the server running Coldfusion.

Are you using TimeFormat to output the time?
Mar 11 '08 #2
dmorand
219 100+
According to the documentation, it is from the server running Coldfusion.

Are you using TimeFormat to output the time?
That's what I thought too. I'm using timeformat to format the time. Here's my code I'm using to validate.

Expand|Select|Wrap|Line Numbers
  1. <cfoutput>Date/Time Loaded: &nbsp;#DateFormat(Now(),"mmm dd yy")# #TimeFormat(Now(),"HH:mm")#</cfoutput>
  2.  
I've tried restarting Coldfusion and IIS but I'm still getting the incorrect time.
Mar 11 '08 #3
acoder
16,027 Expert Mod 8TB
Perhaps you need to look into getTimeZoneInfo().
Mar 12 '08 #4
dmorand
219 100+
Perhaps you need to look into getTimeZoneInfo().
I figured it out. I had upgraded to JVM 1.4.2_11 when I was running CF 6, but then I upgraded to CF 7 and it changed my path to the JVM. I swapped it back, and all is well now.

http://www.adobe.com/go/d2ab4470
Mar 12 '08 #5
acoder
16,027 Expert Mod 8TB
Glad you found the solution and thanks for posting! I think those DST changes in the US have been asked about in the JavaScript forum too.
Mar 12 '08 #6
where can I find this path to check if this is my problem as well? Thanks
Oct 13 '10 #7
acoder
16,027 Expert Mod 8TB
Check the Java and JVM section in Coldfusion Administrator. You may also find this KB article useful.
Oct 14 '10 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Stupidgirl | last post: by
1 post views Thread by Thomas Bartkus | last post: by
1 post views Thread by simina | last post: by
1 post views Thread by E. Liepins | last post: by
7 posts views Thread by Jerome | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.