diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5e04cec --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: php + +php: + - '7.1' + - '7.2' + +before_script: + - composer install + +script: + - vendor/bin/phpunit + +after_success: + - travis_retry php vendor/bin/php-coveralls -v diff --git a/README.md b/README.md index ff5f83b..404e616 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ # php-json-logger +[![Latest Stable Version](https://poser.pugx.org/nekonomokochan/php-json-logger/v/stable)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![Total Downloads](https://poser.pugx.org/nekonomokochan/php-json-logger/downloads)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![Latest Unstable Version](https://poser.pugx.org/nekonomokochan/php-json-logger/v/unstable)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![License](https://poser.pugx.org/nekonomokochan/php-json-logger/license)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![Monthly Downloads](https://poser.pugx.org/nekonomokochan/php-json-logger/d/monthly)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![Daily Downloads](https://poser.pugx.org/nekonomokochan/php-json-logger/d/daily)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![composer.lock](https://poser.pugx.org/nekonomokochan/php-json-logger/composerlock)](https://packagist.org/packages/nekonomokochan/php-json-logger) +[![Build Status](https://travis-ci.org/nekonomokochan/php-json-logger.svg?branch=master)](https://travis-ci.org/nekonomokochan/php-json-logger) +[![Coverage Status](https://coveralls.io/repos/github/nekonomokochan/php-json-logger/badge.svg?branch=master)](https://coveralls.io/github/nekonomokochan/php-json-logger?branch=master) + LoggingLibrary for PHP. Output by JSON Format This Library is mainly intended for use in web applications. diff --git a/build/cov/.gitignore b/build/cov/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/build/cov/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/build/logs/.gitignore b/build/logs/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/build/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/composer.json b/composer.json index b1a1001..fc51948 100644 --- a/composer.json +++ b/composer.json @@ -28,11 +28,13 @@ "require-dev": { "php": ">= 7.0.0", "phpunit/phpunit": "^7.1", - "friendsofphp/php-cs-fixer": "^2.11" + "friendsofphp/php-cs-fixer": "^2.11", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpcov": "^5.0" }, "scripts": { "test": "phpunit", - "test:coverage": "phpunit --coverage-html coverage", + "test:coverage:html": "phpunit --coverage-html coverage", "format": "php-cs-fixer fix --diff -v --config .php_cs.dist" } } diff --git a/composer.lock b/composer.lock index b2e6c10..c413a57 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "07bef7bba61cc26490dc40eea38fad18", + "content-hash": "fbdd8df1df5ea30071deaf231213f3dc", "packages": [ { "name": "monolog/monolog", @@ -593,6 +593,187 @@ "description": "A tool to automatically fix PHP code style", "time": "2018-03-21T17:41:26+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2017-03-20T17:10:46+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.7.0", @@ -740,6 +921,89 @@ "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCoveralls\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2018-05-22T23:11:08+00:00" + }, { "name": "php-cs-fixer/diff", "version": "v1.3.0", @@ -1255,6 +1519,58 @@ ], "time": "2018-02-01T13:16:43+00:00" }, + { + "name": "phpunit/phpcov", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpcov.git", + "reference": "72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8", + "reference": "72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpunit/php-code-coverage": "^6.0", + "phpunit/phpunit": "^7.0", + "sebastian/diff": "^3.0", + "sebastian/finder-facade": "^1.1", + "sebastian/version": "^2.0", + "symfony/console": "^3.0 || ^4.0" + }, + "bin": [ + "phpcov" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "CLI frontend for php-code-coverage", + "homepage": "https://github.com/sebastianbergmann/phpcov", + "time": "2018-02-04T10:18:50+00:00" + }, { "name": "phpunit/phpunit", "version": "7.1.5", @@ -1391,6 +1707,56 @@ ], "time": "2018-04-11T04:50:36+00:00" }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -1673,6 +2039,45 @@ ], "time": "2017-04-03T13:19:02+00:00" }, + { + "name": "sebastian/finder-facade", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/finder-facade.git", + "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", + "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", + "shasum": "" + }, + "require": { + "symfony/finder": "~2.3|~3.0|~4.0", + "theseer/fdomdocument": "~1.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", + "homepage": "https://github.com/sebastianbergmann/finder-facade", + "time": "2017-11-18T17:31:49+00:00" + }, { "name": "sebastian/global-state", "version": "2.0.0", @@ -1954,6 +2359,69 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "symfony/config", + "version": "v4.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "5ceefc256caecc3e25147c4e5b933de71d0020c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/5ceefc256caecc3e25147c4e5b933de71d0020c4", + "reference": "5ceefc256caecc3e25147c4e5b933de71d0020c4", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2018-05-16T14:33:22+00:00" + }, { "name": "symfony/console", "version": "v4.0.11", @@ -2564,6 +3032,105 @@ "homepage": "https://symfony.com", "time": "2018-02-19T16:50:22+00:00" }, + { + "name": "symfony/yaml", + "version": "v4.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "80e4bfa9685fc4a09acc4a857ec16974a9cd944e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/80e4bfa9685fc4a09acc4a857ec16974a9cd944e", + "reference": "80e4bfa9685fc4a09acc4a857ec16974a9cd944e", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-05-30T07:26:09+00:00" + }, + { + "name": "theseer/fdomdocument", + "version": "1.6.6", + "source": { + "type": "git", + "url": "https://github.com/theseer/fDOMDocument.git", + "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/6e8203e40a32a9c770bcb62fe37e68b948da6dca", + "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "lib-libxml": "*", + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "lead" + } + ], + "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", + "homepage": "https://github.com/theseer/fDOMDocument", + "time": "2017-06-30T11:53:12+00:00" + }, { "name": "theseer/tokenizer", "version": "1.1.0", diff --git a/phpunit.xml b/phpunit.xml index 548779c..5eba55b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -10,4 +10,8 @@ src/ + + + + diff --git a/tests/LoggerTest.php b/tests/LoggerTest.php index 7b0ab20..b5d305a 100644 --- a/tests/LoggerTest.php +++ b/tests/LoggerTest.php @@ -58,7 +58,7 @@ public function outputInfoLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -98,7 +98,7 @@ public function outputErrorLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], 'errors' => [ 'message' => 'TestException', @@ -148,7 +148,7 @@ public function outputUserAgent() 'remote_ip_address' => '127.0.0.1', 'user_agent' => $userAgent, 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -191,7 +191,7 @@ public function outputRemoteIpAddress() 'remote_ip_address' => $remoteIpAddress, 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -230,7 +230,7 @@ public function setTraceIdIsOutput() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -279,7 +279,7 @@ public function setLogFileName() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -346,7 +346,7 @@ public function outputDebugLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -386,7 +386,7 @@ public function outputNoticeLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -426,7 +426,7 @@ public function outputWarningLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], ]; @@ -467,7 +467,7 @@ public function outputCriticalLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], 'errors' => [ 'message' => 'TestCritical', @@ -515,7 +515,7 @@ public function outputAlertLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], 'errors' => [ 'message' => 'TestCritical', @@ -563,7 +563,7 @@ public function outputEmergencyLog() 'remote_ip_address' => '127.0.0.1', 'user_agent' => 'unknown', 'datetime' => $resultArray['datetime'], - 'timezone' => 'Asia/Tokyo', + 'timezone' => date_default_timezone_get(), 'process_time' => $resultArray['process_time'], 'errors' => [ 'message' => 'TestCritical',