Solved

Time discrepancy

Posted on 2013-06-30
5
293 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 SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

831 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