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

Function TimePointToUnixTime

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

Source from the content-addressed store, hash-verified

96}
97
98inline time_t TimePointToUnixTime(const cctz::time_point<cctz::sys_seconds>& tp) {
99 static const cctz::time_point<cctz::sys_seconds> epoch =
100 std::chrono::time_point_cast<cctz::sys_seconds>(
101 std::chrono::system_clock::from_time_t(0));
102 return (tp - epoch).count();
103}
104
105// Returns 'true' iff 'cs' is out of valid range (years 1400..9999 are considered valid).
106inline bool IsDateOutOfRange(const cctz::civil_second& cs) {

Callers 1

LocalToUtcMethod · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected