Skip to content

Group-Object displays dates using a MM/dd/yyyy format regardless of the set culture (PowerShell 7.4 Preview) #20584

@matteocoder

Description

@matteocoder

Prerequisites

Steps to reproduce

  1. start PowerShell as admin;
  2. Set-Culture it-IT
  3. Get-ChildItem | Group-Object -Property LastWriteTime

Expected behavior

Count Name                Group
----- ----                -----
    1 2022-07-17 17:30:00 {...}
...

Actual behavior

Count Name                Group
----- ----                -----
    1 07/17/2022 17:30:00 {...}
...

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.6
PSEdition                      Core
GitCommitId                    7.4.0-preview.6
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

image

Metadata

Metadata

Assignees

Labels

In-PRIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productWG-Engine-Format

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions