473,550 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where does Now() get the date/time?

219 New Member
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
7 11092
16,027 Recognized Expert Moderator MVP
According to the documentation, it is from the server running Coldfusion.

Are you using TimeFormat to output the time?
Mar 11 '08 #2
219 New Member
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>
I've tried restarting Coldfusion and IIS but I'm still getting the incorrect time.
Mar 11 '08 #3
16,027 Recognized Expert Moderator MVP
Perhaps you need to look into getTimeZoneInfo ().
Mar 12 '08 #4
219 New Member
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.

Mar 12 '08 #5
16,027 Recognized Expert Moderator MVP
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
16,027 Recognized Expert Moderator MVP
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

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 tried and tested for all records). My database is in Access format. Field "datetime1" is of Date/Time data type getting the default value by using...
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 can be seen on, amongst others, http:www.manchesterpaul.net/world.war.html http:www.manchesterpaul.net/world.govroy.html For this i used the...
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? The reason I ask is that TimeA and TimeB are significant down to seconds. My *assumption* is that with a large amount of data scatter very few records...
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 seconds 'cause I set them to 0. I need to be able to save them in the database (Access) where the format of the field is for example: 12/22/2004...
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: tblLeaders - lists the people, tblVehicle, tblresults - where the info is stored for trips, tblVehicleType- we charge different rates for different...
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 a "yyyyMMdd" format? (difference between Express and MSDE2000A ?) What is the one and only true way to deal with this problem in VB2005: Local...
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 time field then this format gives the liberty to record times uptill a figure of 59 in different sub-formats, whereas i want the format to be able...
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 formatting considerations at all. They are simple, easy, and brief and you should use them any time you need to incorporate any date literals or...
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 split strings in jsp for that, can u please help me in this code, i have to get difference in min and sec also. <%@ page ...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.