mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-29 08:06:51 +01:00
Update check-time-zone.ps1
This commit is contained in:
parent
b4111a6784
commit
dcd833acef
@ -15,8 +15,8 @@ try {
|
|||||||
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
|
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
|
||||||
$Time = $((Get-Date).ToShortTimeString())
|
$Time = $((Get-Date).ToShortTimeString())
|
||||||
$TZ = (Get-Timezone)
|
$TZ = (Get-Timezone)
|
||||||
if ($TZ.SupportsDaylightSavingTime) { $DST="+01DST" } else { $DST="" }
|
if ($TZ.SupportsDaylightSavingTime) { $DST=", +01:00 DST" } else { $DST="" }
|
||||||
"✅ $Time $($TZ.Id) (UTC+$($TZ.BaseUtcOffset) $DST)."
|
"✅ Time zone is $($TZ.Id) ($Time, UTC+$($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])"
|
||||||
|
Loading…
Reference in New Issue
Block a user