Update check-time-zone.ps1

This commit is contained in:
Markus Fleschutz 2023-06-05 14:58:32 +02:00
parent 91566b318b
commit 67a8cc6a28

View File

@ -17,7 +17,7 @@ try {
$Time = $((Get-Date).ToShortTimeString()) $Time = $((Get-Date).ToShortTimeString())
$TZ = (Get-Timezone) $TZ = (Get-Timezone)
if ($TZ.SupportsDaylightSavingTime) { $DST=", DST+1h" } else { $DST="" } if ($TZ.SupportsDaylightSavingTime) { $DST=", DST+1h" } else { $DST="" }
Write-Host "$Time $($TZ.Id) time (TZ+$($TZ.BaseUtcOffset)$($DST))" Write-Host "$Time @ $($TZ.Id) (TZ+$($TZ.BaseUtcOffset)$($DST))"
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"