?
Solved

Time discrepancy

Posted on 2013-06-30
5
Medium Priority
?
301 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 1000 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 1000 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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