Categories

W2KSG: Time Zones

The WMI section of the scripting guide gives a very simple method of determining the time zone on your machine

Listing 6.20

Get-WmiObject Win32_TimeZone | Format-List

Bias      : 0
SettingID :
Caption   : (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London

Bias returns the offset from GMT and the caption returns the time zone.  Information on daylight saving settings is also available - try get-member on it!

 

Share this post :

 

Technorati Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>