MCPcopy Create free account
hub / github.com/VCVRack/Rack / formatTime

Function formatTime

src/string.cpp:333–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331
332
333std::string formatTime(const char* format, double timestamp) {
334 time_t t = timestamp;
335 char str[1024];
336 size_t s = std::strftime(str, sizeof(str), format, std::localtime(&t));
337 return std::string(str, s);
338}
339
340std::string formatTimeISO(double timestamp) {
341 // Windows doesn't support %F or %T, and %z gives the full timezone name instead of offset

Callers 1

formatTimeISOFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected