diff --git a/tests/conf/timezone.ini b/tests/conf/timezone.ini new file mode 100644 index 00000000..576c5728 --- /dev/null +++ b/tests/conf/timezone.ini @@ -0,0 +1 @@ +date.timezone = UTF \ No newline at end of file diff --git a/tests/mock.php b/tests/mock.php index d6e91781..536d559d 100644 --- a/tests/mock.php +++ b/tests/mock.php @@ -11,7 +11,6 @@ // 测试入口文件 $_SERVER['REQUEST_METHOD'] = 'GET'; -date_default_timezone_set('UTC'); // 定义项目测试基础路径 define('TEST_PATH', __DIR__ . '/'); // 定义项目路径 diff --git a/tests/script/install.sh b/tests/script/install.sh index b2ee5580..0adee7ed 100755 --- a/tests/script/install.sh +++ b/tests/script/install.sh @@ -11,6 +11,8 @@ if [ $(phpenv version-name) != "hhvm" ]; then phpenv config-add tests/conf/memcached.ini phpenv config-add tests/conf/redis.ini + + phpenv config-add tests/conf/timezone.ini fi composer install --no-interaction --ignore-platform-reqs