CPackIFW: Replace use of strftime with cmTimestamp

The latter is more portable.
This commit is contained in:
Brad King 2014-07-23 16:31:15 -04:00
parent 44850a267d
commit 73b336c9f1
1 changed files with 3 additions and 10 deletions

View File

@ -19,6 +19,7 @@
#include "cmGeneratedFileStream.h" #include "cmGeneratedFileStream.h"
#include "cmCPackLog.h" #include "cmCPackLog.h"
#include "cmCPackComponentGroup.h" #include "cmCPackComponentGroup.h"
#include "cmTimestamp.h"
#include <cmsys/SystemTools.hxx> #include <cmsys/SystemTools.hxx>
#include <cmsys/Glob.hxx> #include <cmsys/Glob.hxx>
@ -809,16 +810,8 @@ int cmCPackIFWGenerator::IfwCreatePackageFile()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::string cmCPackIFWGenerator::IfwCreateCurrentDate() std::string cmCPackIFWGenerator::IfwCreateCurrentDate()
{ {
time_t rawtime; cmTimestamp timestamp;
struct tm * timeinfo; return timestamp.CurrentTime("%Y-%m-%d", false);
char buffer[80];
time (&rawtime);
timeinfo = localtime(&rawtime);
strftime(buffer, 80, "%Y-%m-%d", timeinfo);
return buffer;
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------