Solved

Time discrepancy

Posted on 2013-06-30
5
288 Views
Last Modified: 2013-07-11
Hi

I have a web application (ColdFusion) and an MS Access 2003 application both working from the same server.

If I print out the current time using Now() on a web page and in an MS Access vba immediate window I get a discrepancy.

The web application shows me the hour is 16:58 while the MS Access shows me the hour is 17:58.  From my point of view the 17:58 is correct.

Can someone tell me how I can find a work around for this discrepancy.
0
Comment
Question by:Nemetona
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39288285
Hi,

Since the access date is correct, it sounds like the web app is not adjusting for daylight time.  You need to determine where the date/time is coming from on the web app.

Regards,

Bill
0
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 250 total points
ID: 39288411
I'm not an Access person, but I believe it uses the o/s time.  CF uses the time and timezone settings in the jvm.  It sounds like there's a discrepancy between the two.  

Hopefully Bill can help explain how to check the timezone settings in Access. Here is how you can print out the timezone settings used by the CF server:

Now: <cfdump var="#now()#"><br>
Time Zone: <cfdump var="#getTimeZoneInfo()#">
CF Version: <cfdump var="#server.coldfusion#">
<cfset version = createObject("java", "java.lang.System").getProperty("java.version")>
Java: <cfdump var="#version#"><br>
<cfset tz = CreateObject("java", "java.util.TimeZone")>
<cfset tz = tz.getDefault()>
TimeZone: <cfdump var="#tz.getDisplayName()# (#tz.getID()#) "><br>

<cfset prop = createObject("java", "java.lang.System").getProperty("user.timezone")>
User.timezone =  <cfdump var="#prop#"><br> 

Open in new window


If the two are different, you may need to change the JVM timezone to match the one used by Access. But post the results of the above 1st, and we can go from there.
0
 
LVL 14

Accepted Solution

by:
Bill Ross earned 250 total points
ID: 39288837
Hi,

Access does us the OS time.

Regards,

Bill
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39288851
@Bill - Ok, thanks. So most likely the jvm timezone settings are different than the o/s.


@Nemetona - What timezone is your o/s using? Also, please run the CF debugging code above and post the results.
0
 

Author Comment

by:Nemetona
ID: 39318499
I have been move to a different project and need to park this for the time being.  Thank you both for having responded.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now