mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-05 04:03:22 +03:00
CPackIFW: Replace use of strftime with cmTimestamp
The latter is more portable.
This commit is contained in:
1 parent
44850a267d
commit
73b336c9f1
1 file changed
+3
-10
@@ -19,6 +19,7 @@
|
||||
#include "cmGeneratedFileStream.h"
|
||||
#include "cmCPackLog.h"
|
||||
#include "cmCPackComponentGroup.h"
|
||||
#include "cmTimestamp.h"
|
||||
|
||||
#include <cmsys/SystemTools.hxx>
|
||||
#include <cmsys/Glob.hxx>
|
||||
@@ -809,16 +810,8 @@ int cmCPackIFWGenerator::IfwCreatePackageFile()
|
||||
//----------------------------------------------------------------------
|
||||
std::string cmCPackIFWGenerator::IfwCreateCurrentDate()
|
||||
{
|
||||
time_t rawtime;
|
||||
struct tm * timeinfo;
|
||||
char buffer[80];
|
||||
|
||||
time (&rawtime);
|
||||
timeinfo = localtime(&rawtime);
|
||||
|
||||
strftime(buffer, 80, "%Y-%m-%d", timeinfo);
|
||||
|
||||
return buffer;
|
||||
cmTimestamp timestamp;
|
||||
return timestamp.CurrentTime("%Y-%m-%d", false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user