MCPcopy Create free account
hub / github.com/apache/impala / UnixTimeToTimePoint

Function UnixTimeToTimePoint

be/src/runtime/timestamp-value.cc:91–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90namespace {
91inline cctz::time_point<cctz::sys_seconds> UnixTimeToTimePoint(time_t t) {
92 static const cctz::time_point<cctz::sys_seconds> epoch =
93 std::chrono::time_point_cast<cctz::sys_seconds>(
94 std::chrono::system_clock::from_time_t(0));
95 return epoch + cctz::sys_seconds(t);
96}
97
98inline time_t TimePointToUnixTime(const cctz::time_point<cctz::sys_seconds>& tp) {
99 static const cctz::time_point<cctz::sys_seconds> epoch =

Callers 2

UtcToLocalMethod · 0.70
UnixTimeToLocalMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected