MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / dateTimeStr

Method dateTimeStr

common/common.cpp:38–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38std::string DateTime::dateTimeStr(void)
39{
40 time_t unixTime;
41 struct tm timeStruct;
42 time(&unixTime);
43 localtime_r(&unixTime, &timeStruct);
44 return StringUtils::format("%04i%02i%02i-%02i%02i%02i", timeStruct.tm_year + 1900, timeStruct.tm_mon + 1, timeStruct.tm_mday, timeStruct.tm_hour,
45 timeStruct.tm_min, timeStruct.tm_sec);
46}
47
48std::string DateTime::logDateTime(void)
49{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected