09-19-2012 06:05 AM
Hi, I'm doing some GPS emulation and need to retrieve the system Time Zone Offset in (Hour and Minute). For example if Mountain time zone offset hour = -7 and Minute = 00. Is this information possible to get in Labview?
Thanks.
09-19-2012 10:56 AM - edited 09-19-2012 11:00 AM
Hello QRP,
Yes, it can be done, but this way is not very elegant. It will get the GMT offset that your PC has as its current setting.
Use Format Date/TIme String with a format string of "%z". The output is the offset as a STRING formatted HH:MM:SS
Break the string apart with Scan From String to get the individual elements, or by using "%t" as the format, get the offset in seconds.
Rod.
EDIT: There shouldn't be a smiley in the time format above, It's "HH : MM : SS" but ignore the spaces!
11-05-2014 12:48 PM
Thanks!
I nearly got mad playing around with "IsUTC?"-Flags and other stuff. Tried registry access (till I ceased working as admin in WIN7), even played with .NET calls.
11-05-2014 01:24 PM - edited 11-05-2014 01:27 PM
A Small mod to code I had hanging around does the trick nicely
Whoops I forgot to change the display format of the Zone Offset to "Relative time HH:MM:SS"