Problem with COleDateTime::GetCurrentTime()

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
 
D

David Lowndes

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
 
J

jc

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
 
D

David Lowndes

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
 
J

jc

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

Thanks,
-jc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top