I\'m trying to create a DateTime object with a specific UTC timestamp in PowerShell. What\'s the simplest way to do this?
DateTime
I tried:
Get-Date
$utctime = New-Object DateTime 1970, 1, 1, 0, 0, 0, ([DateTimeKind]::Utc)
If you print out $utctime, then you get:
$utctime
1. januar 1970 00:00:00
Also, $utctime.Kind is correctly set to Utc.
$utctime.Kind
Utc