mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Respect -ListAvailable:$false in Get-TimeZone (#26463)
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
// make sure we've got the latest time zone settings
|
||||
TimeZoneInfo.ClearCachedData();
|
||||
|
||||
if (this.ParameterSetName.Equals("ListAvailable", StringComparison.OrdinalIgnoreCase))
|
||||
if (ListAvailable)
|
||||
{
|
||||
// output the list of all available time zones
|
||||
WriteObject(TimeZoneInfo.GetSystemTimeZones(), true);
|
||||
|
||||
Reference in New Issue
Block a user