Skip to content

Commit fe516db

Browse files
committed
Fix timezone conflict
1 parent f79771c commit fe516db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/Test_dynamics.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ TEST_CASE("FirstOrderDynamics") {
225225
graph.importMatrix("./data/matrix.dat", false);
226226
// graph.adjustNodeCapacities();
227227
FirstOrderDynamics dynamics{graph, false, 69, 0., dsf::PathWeight::LENGTH};
228-
CHECK_EQ(dynamics.strDateTime(), "1970-01-01 01:00:00");
228+
std::ostringstream default_oss;
229+
std::time_t defaultTime{0};
230+
default_oss << std::put_time(std::localtime(&defaultTime), "%Y-%m-%d %H:%M:%S");
231+
CHECK_EQ(dynamics.strDateTime(), default_oss.str());
229232
auto const epochStart{
230233
std::chrono::system_clock::to_time_t(std::chrono::system_clock::now())};
231234
dynamics.setInitTime(epochStart);

0 commit comments

Comments
 (0)