diff --git a/tests/libslic3r/test_timeutils.cpp b/tests/libslic3r/test_timeutils.cpp index 9550740fa8..26f682596b 100644 --- a/tests/libslic3r/test_timeutils.cpp +++ b/tests/libslic3r/test_timeutils.cpp @@ -11,8 +11,11 @@ static void test_time_fmt(Slic3r::Utils::TimeFormat fmt) { using namespace Slic3r::Utils; - time_t t = get_current_time_utc(); - + // A fixed mid-year time (2019-07-10 08:50:00 UTC) rather than the current one: local + // time text can't tell apart the hour that repeats when daylight saving ends, so the + // local round trip would fail during that hour. + time_t t = 1562748600; + std::string tstr = time2str(t, TimeZone::local, fmt); time_t parsedtime = str2time(tstr, TimeZone::local, fmt); REQUIRE(t == parsedtime);