10-28-2009 03:00 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Solved! Go to Solution.
10-28-2009 03:20 PM
More info: there may (or may not) be some intermediate events recorded during the test, when there are, they are recorded using the FORMAT DATE/TIME STRING function and appear an hour earlier than the start of the test.
But only on my client's machine, not on mine.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-28-2009 03:21 PM - edited 10-28-2009 03:22 PM
At C, wire a new "get date/time in seconds.vi" to the format date/time string input.
And yes, your client is not adjusting for daylight savings time on his computer.
10-28-2009 03:30 PM - edited 10-28-2009 03:30 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-28-2009 03:40 PM
What baffled me about your problem, is that if it was solely the problem of daylight savings time or UTC differences it would be a matter of hours, not minutes. Also, if you could post some pictures (png) of your code that would really help. It almost sounds like you aren't reading the time in part c when you think you are, which is why i suggested adding the get date/time in seconds right when you want to write the file.
Did you try to wire the get date/time in seconds to the format date/time like I suggested?
Also enabling the UTC checkbox will convert to UTC time which is independent of DST problems. However using UTC can be annoying for anyone relating that time to where they are in their head (UTC -5 etc).
10-28-2009 03:40 PM
I just tested my computer.
I made a VI with both functions tied to indicators.
Both times agreed.
I unchecked the AUTOMATICALLY CORRECT FOR DST in the control panel.
The system clock went from 4:30 to 3:30.
The LabVIEW program did not change (both said 4:30)
I quit LabVIEW and started again, this time they both said 3:30.
I checked the AUTOMATICALLY CORRECT FOR DST in the control panel.
It behaved the same way, in the other direction. IOW, they always agreed.
My client is on XP, I'm on Vista, wonder if that's relevant...
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-28-2009 03:50 PM
if it was solely the problem of daylight savings time or UTC differences it would be a matter of hours, not minutes.
Well, that I can explain by the cal stuff done at the end. If there is no CAL operation, then the time is almost exactly an hour off (time for them to react to the end of the test and hit the DONE button). But if there IS a cal operation, the end of the test is recorded, then they fiddle about for 10 minutes, then click DONE, so the discrepancy is less than an hour.
if you could post some pictures (png) of your code that would really help.
I don't think so, as it's spread out among various VIs, called at various times,etc. No picture will make that clear.
It almost sounds like you aren't reading the time in part c when you think you are
A reasonable thought, but I assure you that the time in part C is read after the DONE button, and the other things are way before it.
Did you try to wire the get date/time in seconds to the format date/time like I suggested?
That won't help on my machine (which already works) and I can't run a test on my client's machine just for this (it costs fuel and operator's time).
Also enabling the UTC checkbox will convert to UTC time which is independent of DST problems.
What UTC "checkbox" are you referring to?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-28-2009 04:09 PM
FWIW, my client is in CDT, while I'm in EDT. That's an hour's difference, though I don't see that as causing a problem, since he starts with source code on his machine.
Perhaps his time zone is set wrong.
Even if so, I don't understand why one function would be different from the other.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-29-2009 03:33 AM
CoastalMaineBird wrote:if it was solely the problem of daylight savings time or UTC differences it would be a matter of hours, not minutes.
if you could post some pictures (png) of your code that would really help.
I don't think so, as it's spread out among various VIs, called at various times,etc. No picture will make that clear.
Well we could see what exact functions and format strings you are using.
Also what version of LabVIEW are you using? Version 7.0 has not a fully bug-free DST time handling.
How do you see the difference? Is this a string indicator or a Timestamp indicator? Timestamp indicaters can be formatted to show the time absolute (GMT). Or the end user could have adjusted the time and not the DST setting. Those settings are very important for the timestamp display. A timestamp data-point contains a given numder of seconds and fractions of seconds since January 1 1904 midnight. The display interpretes this into a string format.
Ton
10-29-2009 08:31 AM
Well we could see what exact functions and format strings you are using.
Blog for (mostly LabVIEW) programmers: Tips And Tricks