サーバーの設定も php.ini の date.timezone も UTC で間違いないのに…
America/Chicagoで表示される…???
centosの設定は UTC
# timedatectl Local time: 金 2023-06-16 02:30:54 UTC Universal time: 金 2023-06-16 02:30:54 UTC RTC time: 金 2023-06-16 02:30:54 Time zone: UTC (UTC, +0000) System clock synchronized: yes NTP service: active RTC in local TZ: no
phpも問題なく
# php -i | grep timezone Default timezone => UTC date.timezone => UTC => UTC
なぜかcodeigniterを実行すると
$ php public/index.php tools/test/getTimezone America/Chicago
codeigniterに設定がありました。。。
/** * -------------------------------------------------------------------------- * Application Timezone * -------------------------------------------------------------------------- * * The default timezone that will be used in your application to display * dates with the date helper, and can be retrieved through app_timezone() * * @var string */ public $appTimezone = 'UTC'; // public $appTimezone = 'America/Chicago';
コメント