MCPcopy Create free account
hub / github.com/asmuth/clip / toString

Method toString

src/utils/UnixTime.cc:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57std::string UnixTime::toString(const char* fmt) const {
58 struct tm tm;
59 time_t tt = utc_micros_ / 1000000;
60 gmtime_r(&tt, &tm); // FIXPAUL
61
62 char buf[256]; // FIXPAUL
63 buf[0] = 0;
64 strftime(buf, sizeof(buf), fmt, &tm);
65
66 return std::string(buf);
67}
68
69Option<UnixTime> UnixTime::parseString(
70 const String& str,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected