-
-
Notifications
You must be signed in to change notification settings - Fork 546
Expand file tree
/
Copy pathlist-timezones.ps1
More file actions
executable file
·26 lines (24 loc) · 821 Bytes
/
list-timezones.ps1
File metadata and controls
executable file
·26 lines (24 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<#
.SYNOPSIS
Lists all available time zones
.DESCRIPTION
This PowerShell script lists all available time zones.
.EXAMPLE
PS> ./list-timezones
Id DisplayName SupportsDaylight
SavingTime
-- ----------- ----------------
Hawaiian Standard Time (UTC-10:00) Hawaii False
...
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
Get-Timezone -listavailable | Format-Table -property Id,DisplayName,SupportsDaylightSavingTime
exit 0 # success
} catch {
"⚠️ ERROR: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))"
exit 1
}