MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / FormatISO8601DateTime

Function FormatISO8601DateTime

src/commons/util/time.cpp:95–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95std::string FormatISO8601DateTime(int64_t nTime) {
96 struct tm ts;
97 time_t time_val = nTime;
98#ifdef _MSC_VER
99 gmtime_s(&ts, &time_val);
100#else
101 gmtime_r(&time_val, &ts);
102#endif
103 return strprintf("%04i-%02i-%02iT%02i:%02i:%02iZ", ts.tm_year + 1900, ts.tm_mon + 1, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec);
104}
105
106std::string FormatISO8601Date(int64_t nTime) {
107 struct tm ts;

Callers 2

LogTimestampStrMethod · 0.85
InitLoggingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected