PHP 8.2 seems to set the timezone to UTC, always set Pacific/Auckland for testcases

Previously the logic only set Pacific/Auckland if the date.timezone setting
on the PHP ini files wasn't set. Let's just always set it if we're processing
the test suite.
This commit is contained in:
Andrew Ruthven 2022-12-10 03:44:24 +13:00 committed by Andrew Ruthven
parent 6ad794eae6
commit 042237b05d
2 changed files with 5 additions and 5 deletions

View File

@ -227,6 +227,6 @@ test_bullseye_latestphp:
after_script: after_script:
- mkdir -p apache2_log - mkdir -p apache2_log
- cp -r /var/log/apache2 apache2_log/test_bullseye_latestphp - cp -r /var/log/apache2 apache2_log/test_bullseye_latestphp
- bzip2 apache2_log/test_bullseye_latestphp/* - bzip2 apache2_log/test_bullseye_latestphp/* || true
- mkdir -p davical_log - mkdir -p davical_log
- cp -r /var/log/davical davical_log/test_bullseye_latestphp - cp -r /var/log/davical davical_log/test_bullseye_latestphp

View File

@ -109,11 +109,11 @@ function early_catch_fatal_error() {
register_shutdown_function('early_catch_fatal_error'); register_shutdown_function('early_catch_fatal_error');
$c->default_timezone = ini_get ( 'date.timezone' ); $c->default_timezone = ini_get ( 'date.timezone' );
if (empty ( $c->default_timezone )) { if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] ) ) {
$c->default_timezone = 'Pacific/Auckland';
}
else if (empty ( $c->default_timezone )) {
$c->default_timezone = 'UTC'; $c->default_timezone = 'UTC';
if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] )) {
$c->default_timezone = 'Pacific/Auckland';
}
} }
// Default some of the configurable values // Default some of the configurable values