Interpret 'this' as a timestamp in UTC and convert to unix time. Returns false if the conversion failed ('unix_time' will be undefined), otherwise true.
| 117 | /// Returns false if the conversion failed ('unix_time' will be undefined), otherwise |
| 118 | /// true. |
| 119 | inline bool TimestampValue::UtcToUnixTime(time_t* unix_time) const { |
| 120 | DCHECK(unix_time != nullptr); |
| 121 | if (UNLIKELY(!HasDateAndTime())) return false; |
| 122 | |
| 123 | *unix_time = DaysSinceUnixEpoch() * SECONDS_PER_DAY + time_.total_seconds(); |
| 124 | return true; |
| 125 | } |
| 126 | |
| 127 | /// Interpret 'this' as a timestamp in UTC and convert to unix time in microseconds. |
| 128 | /// Nanoseconds are rounded to the nearest microsecond supported by Impala. Returns |
no outgoing calls