From 5638ea90b1e3aa87ad4950a2d0f952f3ccb7bf8b Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 16 Jun 2024 21:49:46 +0900 Subject: [PATCH] test: stop using std::gmtime in tests --- tests/test_find.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_find.cpp b/tests/test_find.cpp index 7559072..385b65b 100644 --- a/tests/test_find.cpp +++ b/tests/test_find.cpp @@ -965,9 +965,7 @@ TEST_CASE("testing toml::find offset_datetime") const auto timet = std::chrono::system_clock::to_time_t(date); // get time_t as gmtime (2018-04-01T03:30:00Z) - const auto tmp = std::gmtime(std::addressof(timet)); // XXX not threadsafe! - CHECK_UNARY(tmp); - const auto tm = *tmp; + const auto tm = toml::detail::gmtime_s(std::addressof(timet)); CHECK_EQ(tm.tm_year + 1900, 2018); CHECK_EQ(tm.tm_mon + 1, 4); CHECK_EQ(tm.tm_mday, 1);