Solved

Time discrepancy

Posted on 2013-06-30
5
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

732 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