LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Windows DST Setting

Some time ago I found (in this forum, but I can't retrace my steps now) a way to read the computer's time zone setting using a VI "GetTimeZoneInfo.vi" that calls "TimeZoneInfo.dll" and returns the offset from GMT in minutes.  However, this offset is the composite result of the Windows Time Zone and DST settings, and this method does not appear to resolve the components.  Now, I need to do this.  Can someone point me to a utility that I can run from within my VI to read Windows Time Zone and DST settings individually?
0 Kudos
Message 1 of 8
(3,798 Views)

You can use a .vbs script.

http://www.microsoft.com/technet/scriptcenter/scripts/os/dates/osdtvb05.mspx

You can also use WMI and Win32_TimeZone

0 Kudos
Message 2 of 8
(3,781 Views)
Great!  This looks like a simple enough answer, but I have no experience wrapping a VI around vbs script.  Please talk me through that part or point me to the right help pages.
 
Thanks!
0 Kudos
Message 3 of 8
(3,774 Views)
0 Kudos
Message 4 of 8
(3,768 Views)
Try G Toolbox at:  http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 5 of 8
(3,746 Views)

Done, an working fine.  Thanks again for the help. 

0 Kudos
Message 6 of 8
(3,739 Views)
I found the current time zone setting in the registry here:
 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
 
I have attached a 7.1 VI that returns the current timezone and DST values.
0 Kudos
Message 7 of 8
(3,555 Views)

Fantastic!  It is much faster than running that VB script.  I'm using it.

Thanks very much for remembering that I was looking...

0 Kudos
Message 8 of 8
(3,549 Views)