Skip to content

Commit e96eacf

Browse files
committed
fix(spanner): correct chrono arithmetic in Interval integration test (#15163)
1 parent a202418 commit e96eacf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google/cloud/spanner/integration_tests/data_types_integration_test.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,9 @@ TEST_F(DataTypeIntegrationTest, SelectIntervalFromTimestampDiff) {
535535
std::chrono::hours(1))};
536536
std::time_t now_seconds =
537537
std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
538-
std::time_t one_hour_later_seconds = now_seconds + 3600;
538+
std::time_t one_hour_later_seconds =
539+
std::chrono::system_clock::to_time_t(
540+
std::chrono::system_clock::now() + std::chrono::hours(1));
539541

540542
std::vector<std::vector<Timestamp>> const data = {std::vector<Timestamp>{
541543
MakeTimestamp(MakeTime(now_seconds, 0)).value(),

0 commit comments

Comments
 (0)