4

I'm testing an existing PowerShell module that uses a third party REST API. With PowerShell 5.1, the module correctly returns json with an embedded date string in UTC format, as expected. However, when using PowerShell 7.x, the UTC string is automatically converted to the local time format within the json output.

This is obviously a change in the v7.1 Invoke-RestMethod cmdlet. Is there a way to prevent this automatic conversion of date strings?

Roy Atkins
  • 99
  • 1
  • 2

0 Answers0