Skip to content

Commit

Permalink
log minutes correctly (redcanaryco#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
clr2of8 authored and Michael Haag committed Oct 21, 2019
1 parent 3d839e7 commit c903c6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function Write-ExecutionLog($startTime, $technique, $testNum, $testName, $logPat
New-Item $logPath -Force -ItemType File | Out-Null
}

$timeUTC = (Get-Date($startTime).toUniversalTime() -uformat "%Y-%m-%dT%H:%m:%SZ").ToString()
$timeLocal = (Get-Date($startTime) -uformat "%Y-%m-%dT%H:%m:%S").ToString()
$timeUTC = (Get-Date($startTime).toUniversalTime() -uformat "%Y-%m-%dT%H:%M:%SZ").ToString()
$timeLocal = (Get-Date($startTime) -uformat "%Y-%m-%dT%H:%M:%S").ToString()
[PSCustomObject][ordered]@{ "Execution Time (UTC)" = $timeUTC; "Execution Time (Local)" = $timeLocal; "Technique" = $technique; "Test Number" = $testNum; "Test Name" = $testName } | Export-Csv -Path $LogPath -NoTypeInformation -Append
}

0 comments on commit c903c6c

Please sign in to comment.