Problem with COleDateTime::GetCurrentTime()

  • Thread starter Thread starter jc
  • Start date Start date
J

jc

Hello,

We are developing an App with VS2008 (64-bit). The application is date/time
sensitive (the App runs 24/7). We noticed some problems with the 64-bit
version of
the App relating to the COleDateTime::GetCurrentTime() funtion. The
COleDateTime::GetCurrentTime() sometimes returned an incorrect time (both the
hours and minutes were wrong).

I don't know if this is a 64-bit problem or not, but in the past, when we
ran our
32-bit version of the App, we never saw this problem. Any ideas on how to
fix this
anomaly?

Thanks
-jc
 
We are developing an App with VS2008 (64-bit). The application is date/time
sensitive (the App runs 24/7). We noticed some problems with the 64-bit
version of
the App relating to the COleDateTime::GetCurrentTime() funtion. The
COleDateTime::GetCurrentTime() sometimes returned an incorrect time (both the
hours and minutes were wrong).

Wrong - in what way?

Have you got a simple application (source code) that anyone can use to
reproduce the problem?

Dave
 
Hi David,

Thank you for taking the time to respond to my posting.

To answer your question, "How is the time wrong?",
the function does not return the correct time of day?
Sometimes the "Gethour()" function is behind by an
hour, and the "GetMinute()" function is ahead by several
minutes.

Standby though, I think this might be a daylight savings issue.
When I reboot the computer, and then watch the system clock
(in the system tray), the system clock displays the correct time,
and then a few seconds later, the system clock displays a time
that is behind by an hour and off by a few minutes. I tried installing
the "daylight savings" patch, but that did not seem to solve the
problem.

Is there a "daylight savings" patch exclusively for
Windows XP Pro x64? The only patch that I could find
was for Server 2003 x64, but the KB article said it was
for Windows XP Pro x64 also.

This is an intermittent problem. I just happen to catch the
anomaly in the debugger, after watching the App run for 40 minutes.

Thanks,
-jc
 
Standby though, I think this might be a daylight savings issue.
When I reboot the computer, and then watch the system clock
(in the system tray), the system clock displays the correct time,
and then a few seconds later, the system clock displays a time
that is behind by an hour and off by a few minutes. I tried installing
the "daylight savings" patch, but that did not seem to solve the
problem.

Is there a "daylight savings" patch exclusively for
Windows XP Pro x64? The only patch that I could find
was for Server 2003 x64, but the KB article said it was
for Windows XP Pro x64 also.

I'd assume it was for both as well.
This is an intermittent problem. I just happen to catch the
anomaly in the debugger, after watching the App run for 40 minutes.

If you can see the effect with the system tray clock I don't think
it's going to be a coding issue you can work around.

You're not running a virtual machine by any chance? I've heard that
these can often have clock problems, though I've never encountered
them myself.

Dave
 
Problem solved. Yes, it was a DST issue, but the DST issue was on the DC,
and not on my local PC.

Thanks,
-jc
 
Back
Top