Convenience functions for TimestampValue->Unix time conversion that assume that the conversion is successful.
| 304 | // Convenience functions for TimestampValue->Unix time conversion that assume that |
| 305 | // the conversion is successful. |
| 306 | int64_t FloorToSeconds(const TimestampValue& ts) { |
| 307 | EXPECT_TRUE(ts.HasDateAndTime()); |
| 308 | int64_t result = 0; |
| 309 | EXPECT_TRUE(ts.UtcToUnixTime(&result)); |
| 310 | return result; |
| 311 | } |
| 312 | |
| 313 | int64_t RoundToMicros(const TimestampValue& ts) { |
| 314 | EXPECT_TRUE(ts.HasDateAndTime()); |
no test coverage detected