dmstr / docker-php-yii2

:whale: :cd: Docker PHP image containing extensions and libraries for Yii 2.0 Framework
99 stars 33 forks source link

Setting timezone in php.ini #34

Closed WeeSee closed 5 years ago

WeeSee commented 5 years ago

I'm using dmstr/php-yii2:7.2-fpm-4.6-alpine-nginx as base image. Really great!

How can I set the timezone in PHP ini-settings?

Can I do this in my docker-compose.yml file?

Is there an ENV-Variable for the timezone?

schmunk42 commented 5 years ago

There's no ENV var for that.

But you should be able to add an ini setting like so:

COPY timezone.ini /usr/local/etc/php/conf.d/timezone.ini

Note: Please be aware that we don't actively support Alpine PHP images, since we had many issues, especially with I18N, timezones and so on...