Share via

bug in powershell module Convert*-Json

Anonymous
2019-02-18T08:59:24+00:00

Hi  all,

The date property goes one day back when I convert it to Json and directly convert it back.

Get-Date | Select-Object -Property *

DateTime : monday 18 february 2019 09:45:59

Date         :  18-2-2019 00:00:00

Get-Date | Select-Object -Property * | ConvertTo-Json | ConvertFrom-Json

DateTime : monday 18 february 2019 09:45:59

Date         : 17-2-2019 23:00:00

Looks like a bug to me.......

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2019-02-19T08:23:37+00:00

    Hi Edwin,

    Thanks for the reply. We appreciate your time and hope that your query is responded soon.

    Regards,

    Peer Samie

    Microsoft Community-Moderator

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-02-19T06:36:04+00:00

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-02-19T05:16:56+00:00

    Hi Edwin,

    We do have a dedicated support forum for programmers and developers. Since the command uses the ConvertTo-Json and ConvertFrom-Json cmdlets to convert a DateTime object from the Get-Date cmdlet to a JSON object then to a PSCustomObject, I would suggest to post your query on MSDN Forums.

    Regards,

    Peer Samie

    Microsoft Community-Forums

    Was this answer helpful?

    0 comments No comments