LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Starting Conditions of "Seconds to Date/Time.vi" seem to be not correct

Hello,

I wrote a VI that calculates the seconds which have past between two different dates. The arguments are two arrays from 0 (year) to 5 (second). This VI has got the advantage that it isn't limited to the interval of 1904 - 2040 given by the VI "Seconds to Date/Time.vi".

It works pretty well and gives the same results as the the VI "Seconds to Date/Time.vi" when using Intervals like 1980_04_03_10:44:33 => 2004_12_03_02:44:33!

The problem starts when I want to calculate the seconds from 1904_01_01_12:00:00 to now. "Seconds to Date/Time.vi" and my VI differ in 10 hours. The results meet when I use 1904_01_01_02:00:00 in my program!

Could it be that the "context help" is wrong by saying that "Seconds to Date/Time.vi" starts at 1904_01_01_12:00:00 am?

I thought about time-zone problems. But "context help" said that "Seconds to Date/Time.vi" gives a time-zone independant result.

Maybe anyone of you has got an idea. I would like to hear it.

Thank you in advance.
0 Kudos
Message 1 of 2
(2,505 Views)
The LV time format treats 0 as 01/01/1904 00:00:00 GMT. Try it - convert 1 to a timestamp, and you will see that you won't get 00:00:01 but something else (I think 00:02:01, are you +2 GMT?). If you try something that's before that time, LV won't process it.
Now, I assume you meant 00:00:00 and not 12:00:00, so I'm not sure why you got a 10 hours difference, since you say it started working at 02:00. I think the best idea is if you post your VI (and a few more details on how to recreate the problem), so we can have a look.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,487 Views)