mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
CTest: fix Time formatting in Notes.xml
Notes.xml was reporting its timestamp in E-notation. Here's an example of what this looked like: <Time>1.50938e+09</Time> This format is unsuitable for precisely determining when the Notes file was generated. As a result of this commit, the same field now appears as: <Time>1509383044</Time>
This commit is contained in:
+2
-1
@@ -12,6 +12,7 @@
|
|||||||
#include "cmsys/String.hxx"
|
#include "cmsys/String.hxx"
|
||||||
#include "cmsys/SystemInformation.hxx"
|
#include "cmsys/SystemInformation.hxx"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstdint>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -1421,7 +1422,7 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml,
|
|||||||
std::string note_time = this->CurrentTime();
|
std::string note_time = this->CurrentTime();
|
||||||
xml.StartElement("Note");
|
xml.StartElement("Note");
|
||||||
xml.Attribute("Name", file);
|
xml.Attribute("Name", file);
|
||||||
xml.Element("Time", cmSystemTools::GetTime());
|
xml.Element("Time", static_cast<uint64_t>(cmSystemTools::GetTime()));
|
||||||
xml.Element("DateTime", note_time);
|
xml.Element("DateTime", note_time);
|
||||||
xml.StartElement("Text");
|
xml.StartElement("Text");
|
||||||
cmsys::ifstream ifs(file.c_str());
|
cmsys::ifstream ifs(file.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user