LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daylight

LabVIEW seconds to Date/Time does not always work correctly. It always convert to the time with current DST status, regardless of if target time is in the same status of DST.
In the same way, when I converted some specific date/time to seconds, atill it convrted with current DST status. Even if I specify DST off to the date/time cluster, it assumes DST is on when it is currently in summer season.
It is serious to take historical data. Trend graph does not show correct local time in its axis when the data exits accross DST boundary.
Is there ay good solution to avoid this ?
My application will be provided to customers as exe file, so set time zone to GMT without automatic time adjust does not help.
0 Kudos
Message 1 of 3
(2,549 Views)
If you want to display data with timestamp local to the time it was taken, you have to store timestamp with the UT offset. For example, your data was taken this winter at time t with UT offset -05. If you want to display this data now, with DST the offset at -04 (or if you are in a different time zone), you have to adjust the time scale of 1 hour for a correct display.

To calculate the current UT offset, feed 0 to "Seconds to Date/Time" function and read the time field. If the year is 1903, substract 24.


LabVIEW, C'est LabVIEW

0 Kudos
Message 2 of 3
(2,549 Views)
This is a new bug in version 7.0. It becomes more apparent when you try to display a historic date in its UT form. If the daylight savings time status has changed between the historic date and the current date you will get a 1hr error. The solution / work-around is to compare the DST status from the historic date to the status from the current date and if they are different you need to add 1hr or subract 1hr depending on which way the DST status has changed.
0 Kudos
Message 3 of 3
(2,549 Views)