469,270 Members | 1,114 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

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 10657
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.