Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

DateStr outputting incorrect value?

$
0
0

I got a report of an anomaly on a production application.  It occurred yesterday.  A few UUTs apparently "skipped ahead" by several hours of testing inexplicably.  My software records unit test results every 4 seconds, so I have pretty good visibility of such errors.  Here is a screenshot:

 

2017-05-05 10_31_14-_E__time warp.txt - Notepad++ [Administrator].png

 

Notice columns 2-3.  These are produced by calls to DateStr() and TimeStr().  Several columns over, you'll see a test time string also in HH:MMSmiley FrustratedS format.  This value is calculated by calling GetCurrentDateTime().

 

You'll notice that between the Date/TimeStr columns and my elapsed column, they agree that some sort of time warp happened, to the tune of 27 hours!

 

I checked the PC's real time clock.  It was correct to within a few minutes, correct date, correct AM/PM.  

 

This codebase has been released and stable for a few years now, so I wouldn't expect issues around the use of this part of my logging mechanism.  This is the first time I've ever witnessed an error quite like this where I couldn't depend on CVI's date/time functions.

 

Should I be worried?


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>