Colleague Dev Ashish posted about the challenges of Accessing ZoneInfo from Windows. He points out in .NET 3.5 the TimeZoneInfo class was added.
[System.TimeZoneInfo]::GetSystemTimeZones()
This command returns 89 entries and several properties.
More Examples
Get-TimeZones East
Find All TimeZones with ‘East’ in there ID.
Function Get-TimeZones ($id) { $where = {$_.Id -match "$id"} [System.TimeZoneInfo]::GetSystemTimeZones() | Where $where } Get-TimeZones East
General Use
$TZI=[System.TimeZoneInfo] $TZI::Local $TZI::Local.DaylightName $TZI::Local.DisplayName "" $TZI::FindSystemTimeZoneById("Tokyo Standard Time")
Other Resources
- The PowerShell Guy shows how to retrieve Time Zone Info with WMI
- Thomas Lee HERE
- Richard Siddaway HERE



{ 1 trackback }
{ 0 comments… add one now }