08-11-2016 04:47 PM - edited 08-11-2016 04:48 PM
Hello,
I am trying to convert a number string to a time stamp, however, for some reason, the first number in the string array is outputting the wrong time. It should actually be 11:00:00 AM but instead it reads 10:00:00:913 AM. Can you tell me how I can fix this code so that the correct time of 11:00:00 AM is output for the first element in the output Array? Thanks.
08-11-2016 05:11 PM
Where did these original values come from?
08-11-2016 09:34 PM
hiNI wrote: It should actually be 11:00:00 AM but instead it reads 10:00:00:913 AM.
Sounds like Daylight Savings Time and/or time zone is effecting your display.
08-11-2016 09:39 PM
Hello,
The data is originally read from a text file.
Thanks.
08-11-2016 09:40 PM
Is there a setting to adjust for this?
Thanks.
08-11-2016 10:00 PM
You say that the data is read from a text file, yet your array is not Array of Strings, but Array of Dbl. Your conversion of Strings to Dbl is clearly wrong (and probably not necessary -- you should be able to go directly from a Date/Time String to a TimeStamp), but without seeing all your code, it is difficult to identify where you made the mistake. Are you, by chance, in Daylight Savings Time? [You might not be in the US ...]
Bob Schor
08-12-2016 03:38 AM - edited 08-12-2016 03:39 AM
Besides any discussion Bob is introducing, i assume that you are running into a time zone configuration issue.
LV reads time zone configuration from the OS when LV is launched. All the time indicators are using this information to "correct" time stamps to the local time zone.
When you change your time zone in the OS and re-run the VI without restarting LV, you still get the same time display. When you re-start LV in between, you will get a different time display. This holds true at least for standard coniguration of time indicators which is "use system time format".
Conclussion: It is expected behavior.
Norbert