Skip to content

Commit

Permalink
add timestamp to cobertura output
Browse files Browse the repository at this point in the history
  • Loading branch information
tonerdo committed Apr 14, 2018
1 parent 1fe7119 commit a938410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coverlet.core/Reporters/CoberturaReporter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -20,7 +21,7 @@ public string Report(CoverageResult result)
coverage.SetAttribute("line-rate", summary.CalculateLineCoverage(result.Modules).ToString());
coverage.SetAttribute("branch-rate", summary.CalculateBranchCoverage(result.Modules).ToString());
coverage.SetAttribute("version", "1.9");
coverage.SetAttribute("timestamp", "0");
coverage.SetAttribute("timestamp", ((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds).ToString());

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

0 comments on commit a938410

Please sign in to comment.