Skip to content

Commit 4c9e854

Browse files
committed
Timestamps are now correctly converted from UTC to local timezone
1 parent d29ad06 commit 4c9e854

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/OnCommand-Insight.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ function ConvertFrom-UnixTimestamp {
212212
PROCESS {
213213
$Timestamp = @($Timestamp)
214214
foreach ($Timestamp in $Timestamp) {
215-
$Date = [System.TimeZoneInfo]::ConvertTime(([datetime]'1/1/1970').AddMilliseconds($Timestamp),$Timezone)
215+
$Date = [System.TimeZoneInfo]::ConvertTimeFromUtc(([datetime]'1/1/1970').AddMilliseconds($Timestamp),$Timezone)
216216
Write-Output $Date
217217
}
218218
}

0 commit comments

Comments
 (0)