Convert Between Time Zones
$DateTime = [DateTime]::SpecifyKind($date, [DateTimeKind]::Unspecified) $from = [System.TimeZoneInfo]::FindSystemTimeZoneById($FromTimeZone) $to = [System.TimeZoneInfo]::FindSystemTimeZoneById($ToTimeZone) $utc = [System.TimeZoneInfo]::ConvertTimeToUtc($DateTime, $from) [System.TimeZoneInfo]::ConvertTime($utc, $to)
Search for a Time Zones
[System.TimeZoneInfo]::GetSystemTimeZones() | Where-Object{$_.DisplayName -like "*$($Name)*" -or $_.DaylightName -like "*$($Name)*" -or $_.StandardName -like "*$($Name)*" -or $_.Id -like "*$($Name)*"}