summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-23 20:31:15 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-28 14:24:03 (GMT)
commit73b336c9f145746b5d554c80b9d8d6c40613ec5c (patch)
tree727746aea83e5e339a05d0e960e90fafb9447dda
parent44850a267d1c2ee64947ebb93de3998549b59d03 (diff)
downloadCMake-73b336c9f145746b5d554c80b9d8d6c40613ec5c.zip
CMake-73b336c9f145746b5d554c80b9d8d6c40613ec5c.tar.gz
CMake-73b336c9f145746b5d554c80b9d8d6c40613ec5c.tar.bz2
CPackIFW: Replace use of strftime with cmTimestamp
The latter is more portable.
-rw-r--r--Source/CPack/cmCPackIFWGenerator.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/CPack/cmCPackIFWGenerator.cxx b/Source/CPack/cmCPackIFWGenerator.cxx
index a4f33b4..51c0f2e 100644
--- a/Source/CPack/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/cmCPackIFWGenerator.cxx
@@ -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);
}
//----------------------------------------------------------------------