Skip to content

Commit 4f5f9f0

Browse files
derickrjmikola
authored andcommitted
Force date.timezone to be "UTC"
This is necessary, because without it, the check for whether SSL is enabled fails, as the phpinfo() output buffer that it uses gets aborted with:: [2018/12/11 16:35:00.441] 099+ date/time support => enabled [2018/12/11 16:35:00.441] 100+ "Olson" Timezone Database Version => 2015.5 [2018/12/11 16:35:00.441] 101+ Timezone Database => internal [2018/12/11 16:35:00.441] 102+ skip E_WARNING: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. @ /data/mci/d58ba616b6660bdc1a013e7e0584a4dd/src/tests/utils/tools.php:74
1 parent e00cd92 commit 4f5f9f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/utils/basic-skipif.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ if ( ! extension_loaded('mongodb')) {
77
exit('skip mongodb extension is not loaded');
88
}
99

10+
/* Force date.timezone to be "UTC" */
11+
date_default_timezone_set("UTC");
12+
1013
set_error_handler(function($errno, $errstr, $errfile, $errline) {
1114
exit(sprintf('skip %s: %s @ %s:%d', errno_as_string($errno), $errstr, $errfile, $errline));
1215
});

0 commit comments

Comments
 (0)