nanoninja / docker-nginx-php-mysql

Docker running Nginx, PHP-FPM, MySQL & PHPMyAdmin
1.76k stars 867 forks source link

date() function Error #31

Closed CyberLife-Markus closed 6 years ago

CyberLife-Markus commented 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