Skip to content

Commit

Permalink
Fix typo and update JaCoCo starttime
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Jul 12, 2024
1 parent 13f0b75 commit b1f7f2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/functions/Coverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b1f7f2e

Please sign in to comment.