Created
June 29, 2016 17:02
-
-
Save thomasrayner/4f68b517b01f32fede8f45ed9e74f14f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$UTCTime = $(whatever-code-got-you-utc-time) | |
$strCurrentTimeZone = (Get-WmiObject win32_timezone).StandardName | |
$TZ = [System.TimeZoneInfo]::FindSystemTimeZoneById($strCurrentTimeZone) | |
$LocalTime = [System.TimeZoneInfo]::ConvertTimeFromUtc($UTCTime, $TZ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment