LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug when adding seconds to time stamp ?

Solved!
Go to solution

Hi all,

 

So, I am adding seconds (equivalent of 3 hours) to a time stamp, and I have an inconsistent result.

For one date in particular (October 30), the operation does not add 3 hours, but only 2. This result is reproducible (at least on my PC - Win 10). I tested with LabVIEW 2017 32bits, LabVIEW 2022 32bits, LabVIEW 2022 64bits. I always get the same result.

 

LucG_0-1666786513725.png

 

 

Can someone implement the same diagram, and do the test, please ?

Is there actually a bug in LabVIEW, or is there something corrupted on my machine?...

 

Note: pay attention to the values in the time stamps. For the time stamp on October 30, I noticed that if we change the time value to 05:30:00 for example, but leave the date on 30.10.2022, then the output is correct (time = 08:30:00). The bug seems to be restrained to a certain time frame, from 00:00:00 to 01:59:59, as far as I can tell...

 

 

Thanks for your feedback.

Luc

0 Kudos
Message 1 of 6
(1,430 Views)
Solution
Accepted by topic author LucG

Hello,

 

Your issue is the Summer/Winter time.

It is changing this 29th October at 3 am.

 

So it adds 3 hours then substracts the Daylinght Saving thus minus 1 hour.

Message 2 of 6
(1,418 Views)

I'd say it's some combination of your computer's time zone + DST.  It works fine for me.  (LV 2020.)

billko_1-1666788469511.png

Try to represent both the constant and the indicator timestamps as UTC (don't change the value of the constant, just the representation) and I think you'll see that it "looks right".  (Obviously I can't because it already works for me here in EDT time zone).

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 6
(1,414 Views)

@Defaphe wrote:

Hello,

 

Your issue is the Summer/Winter time.

It is changing this 29th October at 3 am.

 

So it adds 3 hours then substracts the Daylinght Saving thus minus 1 hour.


The OP described the problem so well that that was my immediate thought.  I mean, that is the perfect example of how to describe a problem you are having.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(1,411 Views)

Note that Luc's Question and Defaphe's Answer would be a Surprise to those at NI Headquarters in Austin, TX, because here in the US, our Standard Time is not the same as European "Winter Time".  For reason unknown to me, we change (this year) on November 6, not October 30.  Overseas Travelers, be alert!

 

Bob Schor

0 Kudos
Message 5 of 6
(1,285 Views)

sorry i misread your reply.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(1,281 Views)