summaryrefslogtreecommitdiff
path: root/Source/cmTimestamp.cxx
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:08 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:08 +0900
commit488e9638b71b8b9cdb3055835815d77720eae06b (patch)
treef023cbc75da671dd2b75d3143cde8a066d5a93aa /Source/cmTimestamp.cxx
parentf152fd464ac355590a5bb95451d4cd1ca1079d3c (diff)
downloadcmake-488e9638b71b8b9cdb3055835815d77720eae06b.tar.gz
cmake-488e9638b71b8b9cdb3055835815d77720eae06b.tar.bz2
cmake-488e9638b71b8b9cdb3055835815d77720eae06b.zip
Imported Upstream version 3.10.0upstream/3.10.0
Diffstat (limited to 'Source/cmTimestamp.cxx')
-rw-r--r--Source/cmTimestamp.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index 4b9718847..9fb79d945 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmTimestamp.h"
-#include "cmConfigure.h"
#include <cstring>
#include <sstream>
#include <stdlib.h>
@@ -12,7 +11,7 @@
std::string cmTimestamp::CurrentTime(const std::string& formatString,
bool utcFlag)
{
- time_t currentTimeT = time(CM_NULLPTR);
+ time_t currentTimeT = time(nullptr);
std::string source_date_epoch;
cmSystemTools::GetEnv("SOURCE_DATE_EPOCH", source_date_epoch);
if (!source_date_epoch.empty()) {
@@ -56,14 +55,14 @@ std::string cmTimestamp::CreateTimestampFromTimeT(time_t timeT,
struct tm timeStruct;
memset(&timeStruct, 0, sizeof(timeStruct));
- struct tm* ptr = (struct tm*)CM_NULLPTR;
+ struct tm* ptr = nullptr;
if (utcFlag) {
ptr = gmtime(&timeT);
} else {
ptr = localtime(&timeT);
}
- if (ptr == CM_NULLPTR) {
+ if (ptr == nullptr) {
return std::string();
}
@@ -124,7 +123,9 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
switch (flag) {
case 'a':
+ case 'A':
case 'b':
+ case 'B':
case 'd':
case 'H':
case 'I':