Skip to content

Commit 91566b3

Browse files
committed
Add check-time-zone.ps1
1 parent 5e38219 commit 91566b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Scripts/check-time-zone.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ try {
1616
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
1717
$Time = $((Get-Date).ToShortTimeString())
1818
$TZ = (Get-Timezone)
19-
if ($TZ.SupportsDaylightSavingTime) { $DST="+ 01:00:00 daylight saving time" } else { $DST="" }
20-
Write-Host "$Time (UTC + $($TZ.BaseUtcOffset) $($TZ.Id) $DST)"
19+
if ($TZ.SupportsDaylightSavingTime) { $DST=", DST+1h" } else { $DST="" }
20+
Write-Host "$Time $($TZ.Id) time (TZ+$($TZ.BaseUtcOffset)$($DST))"
2121
exit 0 # success
2222
} catch {
2323
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
2424
exit 1
25-
}
25+
}

0 commit comments

Comments
 (0)