| 108 | } |
| 109 | |
| 110 | inline int64_t TimestampValue::DaysSinceUnixEpoch() const { |
| 111 | DCHECK(HasDate()); |
| 112 | static const boost::gregorian::date epoch(1970,1,1); |
| 113 | return (date_ - epoch).days(); |
| 114 | } |
| 115 | |
| 116 | /// Interpret 'this' as a timestamp in UTC and convert to unix time. |
| 117 | /// Returns false if the conversion failed ('unix_time' will be undefined), otherwise |