473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 11076
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

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

Similar topics

2
by: Jon | last post by:
Hi, I am trying to pick up records from a date range without much luck. For my example below I am trying to pick up all records made in the last month. However none are being found (my code is...
0
by: Stupidgirl | last post by:
Hi, i have had no problem displaying the current date and time, on a static webpage. However, when i try to use the various PHP and MySQL snippets, it does'nt seem to work out. My success story...
1
by: Thomas Bartkus | last post by:
If we have a date/time field and are doing frequent queries WHERE {date/time field} BETWEEN TimeA AND TimeB Does it make sense, query speed wise, to create an index on the date/time field? ...
1
by: simina | last post by:
Hi... I have an "appointments" page where the user should (or not necessarily) choose a date and time for his appointment, from 6 combo boxes:year, month, day, hour, minute and AM or PM, without...
1
by: E. Liepins | last post by:
I am working on a vehicle database. We track when a vehicle is borrowed and when it is returned. We also track the number of kilometres travelled on a particular trip. There are several tables:...
7
by: Jerome | last post by:
Hallo, I know a lot has already been told about date/time fields in a database but still confuses me, specif when dealing with SQLserver(Express). It seems that sqlserver only accepts the date in...
2
by: x | last post by:
hi i am a pilot by profession. i want to create a database of my logbook using ms access 2002. i am facing a problem regarding the format of time field. when i select "Data/Time" data type for my...
0
yasirmturk
by: yasirmturk | last post by:
Standard Date and Time Functions The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any...
0
by: Syed Khaleel Ahamed | last post by:
Dear Sir, I want to get the difference of date/time captured in mysql and present date/time in jsp. I am using the following code to get, but its getting difference only in hrs, i used...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.