Closed CyberLife-Markus closed 6 years ago
php-nginx-compose/docker-compose.yml
php: image: nanoninja/php-fpm:${PHP_VERSION} restart: always volumes: - "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini" - "./web:/var/www/html" # 设置时区 environment: - TZ=Asia/Shanghai container_name: "compose-php-fpm"
php-nginx-compose/etc/php/php.ini
date.timezone = Asia/Shanghai
phpinfo
Default timezone = Asia/Shanghai
When I use the date('1533438556','Y-m-d H:i:s'),result is 8556-08-19 15:33:43
date.timezone = Asia/Shanghai
Default timezone = Asia/Shanghai
When I use the date('1533438556','Y-m-d H:i:s'),result is 8556-08-19 15:33:43