Skip to content

Commit

Permalink
test: stop using std::gmtime in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ToruNiina committed Jun 16, 2024
1 parent 8da85f8 commit 5638ea9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_find.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5638ea9

Please sign in to comment.