MCPcopy Create free account
hub / github.com/SatDump/SatDump / timestampToTod

Function timestampToTod

plugins/inmarsat_support/stdc/module_stdc_parser.cpp:54–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 std::string timestampToTod(time_t time_v)
55 {
56 std::tm *timeReadable = gmtime(&time_v);
57 return (timeReadable->tm_hour > 9 ? std::to_string(timeReadable->tm_hour) : "0" + std::to_string(timeReadable->tm_hour)) + ":" + // Hour HH
58 (timeReadable->tm_min > 9 ? std::to_string(timeReadable->tm_min) : "0" + std::to_string(timeReadable->tm_min)) + ":" + // Minutes mm
59 (timeReadable->tm_sec > 9 ? std::to_string(timeReadable->tm_sec) : "0" + std::to_string(timeReadable->tm_sec)); // Seconds ss
60 }
61
62 void STDCParserModule::process_final_pkt(nlohmann::json &msg)
63 {

Callers 1

drawUIMethod · 0.70

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected