By default, this typically returns local time. However, when I run it within a terminal (System) on a computer through Immy, it’s showing Universal time. If I connect directly to the computer and run the same command in PS, it does show local. Anyone else seeing this?
get-date | Out-String | Write-Host
@DarrenDK can confirm–this might not be the exact explanation because I am not intimately familiar with the Immy source, but I do know a little–I believe the powershell formatters are converting it back to UTC before it gets streamed to the log. If you run that command I listed here. you will be forcing powershell on the machine to format the output as a string, bypassing the formatter for the datetime data type.
1 Like