03-12-2015 08:29 PM
hello,
in the attached program i have 3 inputs that a device gives out as unix timestamps in the same text file as in the format below
1425991048, 855916487: 2015/03/10 12:37
1425990602, 118558215: 2015/03/10 12:30
1424634198, 77786794: 2015/02/22 19:43
timestamp, nano seconds: converted date time
my program is trying to convert these into yy/mm/dd hh:mm:ss.sss
the top 2 are being converted to
2015/03/10 13:37:28.855
2015/03/10 13:30:02.118
which are 1 hour more than what the actual unix timestamp is
and the 3rd one is being converted to the right value which should also have been added 1 hour
2015/02/22 19:43:18.777
so on the top 2 if it is run on a computer that is PST its is adding 1 hr and the same program run in korea shows
2015/03/10 05:37:28.855
i am unable to understand if my program is wrong or if the conversion is not including local time zone offset or if the difference between labview and unix epoch.
i changed the windows system time from PST to a different time zone and also that matches the korean time but still the same outputs.
Plz help
Thanks
03-12-2015 08:45 PM
From my web search, it looks like Korea doesn't use Daylight Savings Time.
For the US, the 3rd date is not within the DST part of the calendar, it is still standard time. The ones dated March 10th are in Daylight Savings Time.
So where are you confused?
03-12-2015 10:33 PM
ok now i see the dst part.
how do i disable dst on the "To Time Stamp" function so the outputs remain same as the date time as indicated in the input text.
so it remain
12:37 not 13:37
12:30 not 13:30
03-13-2015 02:54 AM
If you use the Time/Data to Seconds function you should experiment with the isDST value in there.
Date/Time To Seconds Function
is DST indicates whether the time is standard (0) or daylight savings time (1). You also can set is DST to -1 to have the VI determine the correct time automatically each time you run the VI. If is UTC is TRUE, the function ignores the is DST setting and uses Universal Time.
There have been difficulties with this in the past so you may also want to check your LabVIEW version.