Skip to content

Commit a938410

Browse files
committed
add timestamp to cobertura output
1 parent 1fe7119 commit a938410

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/coverlet.core/Reporters/CoberturaReporter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using System.IO;
34
using System.Linq;
@@ -20,7 +21,7 @@ public string Report(CoverageResult result)
2021
coverage.SetAttribute("line-rate", summary.CalculateLineCoverage(result.Modules).ToString());
2122
coverage.SetAttribute("branch-rate", summary.CalculateBranchCoverage(result.Modules).ToString());
2223
coverage.SetAttribute("version", "1.9");
23-
coverage.SetAttribute("timestamp", "0");
24+
coverage.SetAttribute("timestamp", ((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds).ToString());
2425

2526
XmlElement sources = xml.CreateElement("sources");
2627
foreach (var src in GetSources(result.Modules))

0 commit comments

Comments
 (0)