Skip to content

Inconsistent Get-Date behavior between windows powershell and powershellcore #16928

@TheOnlyWei

Description

@TheOnlyWei

Summary of the new feature / enhancement

As a user, I want Get-Date to be consistent between windows powershell and powershellcore so I don't have to maintain separate, customized scripts for windows powershell and powershellcore.

If you run the following command, you get a decimal value in windows powershell and an integer value in powershellcore.
(Get-Date -Date (Get-Date).AddSeconds(-60).ToUniversalTime() -UFormat %s)

This should be consistent between the two so I can use the same script between windows powershell and powershell core.

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-By DesignThe reported behavior is by design.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions