From: Francis Dupont Date: Thu, 23 Jul 2020 14:26:42 +0000 (+0200) Subject: [#1337] Replaced timelocal X-Git-Tag: Kea-1.7.10~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45a87a2205804a1f3cfb081be7de15d41a10da28;p=thirdparty%2Fkea.git [#1337] Replaced timelocal --- diff --git a/src/lib/util/tests/chrono_time_utils_unittest.cc b/src/lib/util/tests/chrono_time_utils_unittest.cc index e792a179d2..e9d2917233 100644 --- a/src/lib/util/tests/chrono_time_utils_unittest.cc +++ b/src/lib/util/tests/chrono_time_utils_unittest.cc @@ -26,7 +26,8 @@ TEST(ChronoTimeUtilsTest, epoch) { memset(&epoch, 0, sizeof(epoch)); epoch.tm_year = 70; epoch.tm_mday = 1; - time_t tepoch = timelocal(&epoch); + epoch.tm_isdst = -1; + time_t tepoch = mktime(&epoch); system_clock::time_point pepoch = system_clock::from_time_t(tepoch); // We're going to loop through precision values starting with 0 through @@ -110,7 +111,8 @@ TEST(ChronoTimeUtilsTest, bastilleDay) { tm.tm_hour = 12; tm.tm_min = 13; tm.tm_sec = 14; - time_t tbast = timelocal(&tm); + tm.tm_isdst = -1; + time_t tbast = mktime(&tm); system_clock::time_point tpbast = system_clock::from_time_t(tbast); tpbast += milliseconds(500);