mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-14 22:18:18 +02:00
Update check-time-zone.ps1
This commit is contained in:
parent
650e9b5d85
commit
59d1220f36
@ -15,8 +15,8 @@ try {
|
||||
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
|
||||
$Time = $((Get-Date).ToShortTimeString())
|
||||
$TZ = (Get-Timezone)
|
||||
if ($TZ.SupportsDaylightSavingTime) { $DST=", DST+01:00:00" } else { $DST="" }
|
||||
"✅ Time zone is $($TZ.Id) ($Time, UTC+$($TZ.BaseUtcOffset)$DST)."
|
||||
if ($TZ.SupportsDaylightSavingTime) { $DST=" & +01:00:00 DST" } else { $DST="" }
|
||||
"✅ $Time in $($TZ.Id) (UTC+$($TZ.BaseUtcOffset)$DST)"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user