LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time zone change

Ok.  Here is my question.  Run the attached vi in LV7.1 and see the output.  Then without closing LV change your time zone on your machine and run again.  Does the timezone change?  If you close LV and run it again the time zone then changes but I don't want to do that.  Does anyone know the work around or is this a bug in LV7.1?  I appreciate the help.
 
 
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 1 of 7
(3,597 Views)
I duplicated the effect (even with apply and OK), but also came across another issue:
 
My time zone is GMT -7 Arizona, but vi shows GMT -7 US Mountain Standard which is not correct (no daylight savings in AZ).
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 7
(3,589 Views)
P.S:  This is also the effect in an exe. 
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 3 of 7
(3,579 Views)
Have a look here. It seems that your workaround is to use dates before 1970 Smiley Sad (or you can try using the suggestion in #4).

___________________
Try to take over the world!
Message 4 of 7
(3,577 Views)

Are there any patches out there yet??  <Anyone from NI>

BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 5 of 7
(3,565 Views)
I have verified the issue regarding GMT -7 Arizona being replaced with the GMT -7 US Mountain Standard timezone, and I will pass this information onto R&D for review.
 
Regarding the other issue, if you want to gather the most recent system time and your timezone has been updated since you started LabVIEW, you can always use a Windows API call (provided you are on a Windows OS, of course). Look into calling kernel32.dll in a Call Library Node from LabVIEW and using functions such as GetLocalTime, GetSystemTime, or GetTimeZoneInformation.
 
I've attached an example that gets the local time continuously. Test it out. You can change timezones and times from the Windows Taskbar and it will update automatically. The data obtained is a struct with various numeric values such as month, minute, second, etc. I formatted this data into a LabVIEW timestamp format, but you can do with it what you please.
 
Hope this helps!
 
Jarrod S.
National Instruments
Message 6 of 7
(3,526 Views)

One more note: here's a link to the Time Functions information for the Windows API on msdn.com.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemtime_str.asp

Jarrod S.
National Instruments
Message 7 of 7
(3,525 Views)