LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

does labview provide epoch time converter support?

Hi,
My product creates a data log file with time stamp. The time stamp is of the epoch format. The system is based on the linux. So I assume that this time stamp is a unix based format. How  should I convert this time stamp data to the UTC format in labview?
 
Regards
Gopal
0 Kudos
Message 1 of 2
(6,195 Views)

LabVIEW's time stamp is the number of seconds since 00:00:00 01/01/1904. Unix (and hence I presume Linux) time is the number of seconds since 00:00:00 01/01/1970, all times specified as GMT. So all you need to do to a Unix timestamp is to add the number of seconds between these two moments in time to obtain the LabVIEW timestamp.

You can generate this number by using Date/Time to seconds, giving the input as Day 1, Month 1, Year 1970, and all others zero. It gives 2082844800

Make sure that you treat the numbers as U32, as the current date/time exceeds the maximum value for as signed 32 but value.

Rod.

 

Message 2 of 2
(6,180 Views)