Skip to content

#4750 Fix Get-Date -UFormat %G and %g behavior - #14555

Merged
Andrew (anmenaga) merged 5 commits into
PowerShell:masterfrom
brianary:UFormat_Gg
Mar 2, 2021
Merged

#4750 Fix Get-Date -UFormat %G and %g behavior#14555
Andrew (anmenaga) merged 5 commits into
PowerShell:masterfrom
brianary:UFormat_Gg

Conversation

@brianary

@brianary Brian Lalonde (brianary) commented Jan 7, 2021

Copy link
Copy Markdown
Contributor

PR Summary

Corrects the behavior of %G and %g (variants of the same value) in Get-Date -UFormat to match ISO 8601.

PR Context

This is to fix one of the format issues in #4750.

PR Checklist

@iSazonov

Copy link
Copy Markdown
Collaborator

Brian Lalonde (@brianary) Please look test fails.

@iSazonov
Ilya (iSazonov) self-requested a review January 7, 2021 14:40
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jan 7, 2021
@brianary

Copy link
Copy Markdown
Contributor Author

Tricky doing this blind.

Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs Outdated
@iSazonov

Ilya (iSazonov) commented Jan 8, 2021

Copy link
Copy Markdown
Collaborator

Tricky doing this blind.

Every CI has Details button. Then you need to press "View more details on Azure Pipelines" on bottom of right column. There you can see whole build and test process. (And download artifacts too.)

@brianary

Copy link
Copy Markdown
Contributor Author

Sure, I've figured out how to view the test details. I just meant I haven't been able to get a local build environment working yet, so I'm over-relying on the build server and tests still.

I'll get those names changed.

@iSazonov

Copy link
Copy Markdown
Collaborator

I just meant I haven't been able to get a local build environment working yet

You can open new issue and share what is problems you have so that we can help you. (Of cause if you plan to continue contributing.)

@iSazonov Ilya (iSazonov) added Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log Documentation Needed in this repo Documentation is needed in this repo labels Jan 8, 2021
@ghost ghost added the Review - Needed The PR is being reviewed label Jan 16, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@anmenaga

Copy link
Copy Markdown

Would be good for WG-Engine (feels like this is the best match) to review this breaking change in Get-Date -UFormat.

@ghost ghost removed the Review - Needed The PR is being reviewed label Jan 28, 2021
@iSazonov

Copy link
Copy Markdown
Collaborator

Andrew (@anmenaga) You could directly request a review from Engine person.

@ghost ghost added the Review - Needed The PR is being reviewed label Feb 4, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@iSazonov

Copy link
Copy Markdown
Collaborator

Brian Lalonde (@brianary) Please resolve merge conflicts.

@ghost ghost removed the Review - Needed The PR is being reviewed label Feb 4, 2021
@iSazonov Ilya (iSazonov) removed the Documentation Needed in this repo Documentation is needed in this repo label Feb 4, 2021
@iSazonov

Copy link
Copy Markdown
Collaborator

Brian Lalonde (@brianary) Please fix typo in your test file.

@brianary

Copy link
Copy Markdown
Contributor Author

Just trying to keep up with master

Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Date.Tests.ps1 Outdated
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs Outdated
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs Outdated
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs Outdated
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs Outdated
Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Date.Tests.ps1 Outdated
@brianary

Copy link
Copy Markdown
Contributor Author

Rob Holt (@rjmholt) I've implemented your suggestions and rebased from upstream master to try and simplify merging.

Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs Outdated
@brianary

Copy link
Copy Markdown
Contributor Author

Ouch, not a lot of detail on those failing tests.

@iSazonov

Copy link
Copy Markdown
Collaborator

Brian Lalonde (@brianary) I have checked new tests on WSL with Linux date utility and I see we need to correct our tests.

@iSazonov
Ilya (iSazonov) self-requested a review February 18, 2021 06:29
@brianary

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) I see one of the new years was wrong. Fixing…

@rjmholt Rob Holt (rjmholt) added Area-Cmdlets-Utility WG-Engine core PowerShell engine, interpreter, and runtime and removed WG-Engine core PowerShell engine, interpreter, and runtime labels Feb 18, 2021
@ghost ghost added the Review - Needed The PR is being reviewed label Feb 26, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@anmenaga
Andrew (anmenaga) merged commit c5955a5 into PowerShell:master Mar 2, 2021
@ghost ghost removed the Review - Needed The PR is being reviewed label Mar 2, 2021
@iSazonov Ilya (iSazonov) added this to the 7.2.0-preview.4 milestone Mar 2, 2021
@iSazonov

Copy link
Copy Markdown
Collaborator

Brian Lalonde (@brianary) Thanks for your contribution!

@brianary

Copy link
Copy Markdown
Contributor Author

Happy to help!

@ghost

Copy link
Copy Markdown

🎉v7.2.0-preview.4 has been released which incorporates this pull request.:tada:

Handy links:

@kilasuit Ryan Yates (kilasuit) added WG-Cmdlets general cmdlet issues and removed WG-Cmdlets-Utility labels Jul 17, 2026
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log WG-Cmdlets general cmdlet issues WG-Engine core PowerShell engine, interpreter, and runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants