MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / DateTime

Method DateTime

addons/devposture/sysinfo/sysinfo.cpp:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69DateTime::DateTime()
70{
71 auto now = std::chrono::system_clock::now();
72 auto now_time_t = std::chrono::system_clock::to_time_t(now);
73
74 std::stringstream ss;
75 ss << std::put_time(std::localtime(&now_time_t), "%F");
76 date = ss.str();
77
78 ss.str("");
79 ss << std::put_time(std::localtime(&now_time_t), "%T");
80 time = ss.str();
81
82 ss.str("");
83 ss << std::put_time(std::localtime(&now_time_t), "%z");
84 timezone = ss.str();
85}
86
87} // namespace DevPosture

Callers

nothing calls this directly

Calls 1

strMethod · 0.45

Tested by

no test coverage detected