From 88dd777146b402b89901b3eaaca300fad7928293 Mon Sep 17 00:00:00 2001 From: "Hans Krentel (hakre)" Date: Wed, 1 Oct 2025 22:48:31 +0200 Subject: [PATCH] Fix flaky timezone test fixture (GH-18624) As documented in [RunningTests], tests have to be written to be independent of any php.ini file. Without specifying the timezone, the var_dump() will make use of the default timezone that may not be the expected "UTC" timezone. This renders the test-cases flaky and will make them fail if the `date.timezone` is different from the string "UTC". Fix is to interpolate the timezone in the test fixture or to set `date.timezone` to `UTC`. [RunningTests]: docs/source/miscellaneous/running-tests.rst fix-up-of: GH-18624 --- .../tests/multiple_calls_date_period_iterator_current.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/date/tests/multiple_calls_date_period_iterator_current.phpt b/ext/date/tests/multiple_calls_date_period_iterator_current.phpt index b0e90873e6126..6a91c4ccdefc0 100644 --- a/ext/date/tests/multiple_calls_date_period_iterator_current.phpt +++ b/ext/date/tests/multiple_calls_date_period_iterator_current.phpt @@ -2,8 +2,8 @@ Multiple calls to DatePeriod iterator current() leak objects --FILE--