From b1f7f2e42735a85f52a1c65bb34fcb5b2f3b6926 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Fri, 12 Jul 2024 21:11:33 +0000 Subject: [PATCH] Fix typo and update JaCoCo starttime --- src/functions/Coverage.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/functions/Coverage.ps1 b/src/functions/Coverage.ps1 index 2fdfbeee3..4bdc88c87 100644 --- a/src/functions/Coverage.ps1 +++ b/src/functions/Coverage.ps1 @@ -806,9 +806,9 @@ function Get-JaCoCoReportXml { return [string]::Empty } - $now = & $SafeCommands['Get-Date'] - $nineteenSeventy = & $SafeCommands['Get-Date'] -Date "01/01/1970" - [long] $endTime = [math]::Floor((New-TimeSpan -start $nineteenSeventy -end $now).TotalMilliseconds) + $now = [DateTime]::Now + $nineteenSeventy = [DateTime]"01/01/1970" + [long] $endTime = [math]::Floor(($now - $nineteenSeventy).TotalMilliseconds) [long] $startTime = [math]::Floor($endTime - $TotalMilliseconds) $folderGroups = $CommandCoverage | & $SafeCommands["Group-Object"] -Property { @@ -1044,7 +1044,7 @@ function Get-CoberturaReportXml { $now = [DateTime]::Now $nineteenSeventy = [DateTime]"01/01/1970" - [long] $endTime = [math]::Floor($nineteenSeventy - $now).TotalMilliseconds + [long] $endTime = [math]::Floor(($now - $nineteenSeventy).TotalMilliseconds) [long] $startTime = [math]::Floor($endTime - $TotalMilliseconds) $commonRoot = Get-CommonParentPath -Path $CoverageReport.AnalyzedFiles