From fc0e302013c906f25785b98e47e0c3c83642b7bb Mon Sep 17 00:00:00 2001 From: Achim Ennenbach Date: Thu, 24 May 2018 22:04:57 +0200 Subject: [PATCH 1/2] Updated testStrptime() to match the result of strptime on linux. Should also run fine on windows with the updated e_date::strptime() function. --- tests/unit/e_dateTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/e_dateTest.php b/tests/unit/e_dateTest.php index aed8ddfd4..7223238b4 100644 --- a/tests/unit/e_dateTest.php +++ b/tests/unit/e_dateTest.php @@ -157,7 +157,12 @@ 'tm_year' => 118, 'tm_mon' => 4, 'tm_mday' => 13, + 'tm_sec' => 0, + 'tm_min' => 0, + 'tm_hour' => 0, + 'unparsed' => '', 'tm_fmon' => 'May', + 'tm_amon' => 'May', 'tm_wday' => 0, 'tm_yday' => 132, ); @@ -170,6 +175,9 @@ 'tm_mday' => 13, 'tm_hour' => 20, 'tm_min' => 10, + 'tm_sec' => 0, + 'unparsed' => '', + 'tm_amon' => 'May', 'tm_fmon' => 'May', 'tm_wday' => 0, 'tm_yday' => 132, From c0cc29d830e326c3fe1c15e816546d794f2c2744 Mon Sep 17 00:00:00 2001 From: Deltik Date: Thu, 24 May 2018 19:41:46 -0500 Subject: [PATCH 2/2] C locale in e_dateTest::testConvert_date() Standardized locale in e_dateTest::testConvert_date() --- e107 | 2 +- tests/unit/e_dateTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/e107 b/e107 index 1494c1866..78213c4a3 160000 --- a/e107 +++ b/e107 @@ -1 +1 @@ -Subproject commit 1494c186603cf28d3f260c3e17b666aec75da390 +Subproject commit 78213c4a31467a0dde4da35413927e95f8ae494f diff --git a/tests/unit/e_dateTest.php b/tests/unit/e_dateTest.php index aed8ddfd4..cfe12a93b 100644 --- a/tests/unit/e_dateTest.php +++ b/tests/unit/e_dateTest.php @@ -180,6 +180,9 @@ public function testConvert_date() { + // Expected values made using the C locale + setlocale(LC_TIME, 'C'); + // will probably fail on windows $actual = $this->dateObj->convert_date(mktime(12, 45, 03, 2, 5, 2018), 'long'); $expected = 'Monday 05 February 2018 - 12:45:03';