diff --git a/test/chrono-test.cc b/test/chrono-test.cc index 9288a15f..5f0b845b 100644 --- a/test/chrono-test.cc +++ b/test/chrono-test.cc @@ -94,7 +94,7 @@ template auto strftime(TimePoint tp) -> std::string { } TEST(chrono_test, time_point) { - auto t1 = std::chrono::system_clock::now(); + auto t1 = std::chrono::time_point_cast(std::chrono::system_clock::now()); EXPECT_EQ(strftime(t1), fmt::format("{:%Y-%m-%d %H:%M:%S}", t1)); using time_point = std::chrono::time_point;