LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to displaying timezone independant times?

I've logged some data using the Get Date/Time in seconds VI which means the data has UTC/Time zone independent time in the data.

When I read this logged data back in and feed it into my graph axis, Labview automatically applies the current computers daylight savings correction and time shifts all my data. I can't seem to find a flag which disables this. I can set my PC to GMT but I want the correct local time on my PC as do other users of the data.

I see that if I use the seconds to Date/Time VI then there is a DST flag in there that will tell me if DST has been applied, but of course not how much.
0 Kudos
Message 1 of 4
(3,029 Views)
You could add a header to the logfile telling what time zone and DST the PC had when it recorded the data ...then when you read it back on another computer you use that and the same info taken from the current PC to calculate what offset you need to apply to the time values to make them display as they did on the original. You can find a VI that give you the UTC offset at:

http://www.mooregoodideas.com/Downloads/DateTimeTools.zip

Check out this as well:

http://www.searchview.net/ax.pl?http://messages.info-labview.org/1999/11/03/21.html
0 Kudos
Message 2 of 4
(3,028 Views)
Store the UTC offset of the timezone with time data. When you recover the data for display, compare the actual UTC offset with the stored offset to adjust the time scale. To get the UTC offset, feed 0 to "Second to Date/Time". If it outputs Jan 1, 1904 00:00:00 then the offset is 0. The offset is the amount of time different from that era.


LabVIEW, C'est LabVIEW

0 Kudos
Message 3 of 4
(3,028 Views)
Thanks, the Get Offset VI will tell me what to subtract. However I still find it very annoying that Labview will give you seconds after as UTC but then as soon as you use it it goes and applies DST!
0 Kudos
Message 4 of 4
(3,028 Views)