How to change Heroku daylight saving setting

后端 未结 2 539
不知归路
不知归路 2021-01-24 04:42

I could manage to change time zone on Heroku but still it is giving one hour less than my local time. Can anyone help on how to set DST (daylight saving) offset on Heroku?

2条回答
  •  长情又很酷
    2021-01-24 05:21

    I had a similar problem with php and DateTime() with a Symfony project at Heroku. I realized the time difference after the summertime daylight change in Central Europe. Even setting the timezone at heroku does not solve the problem:

    $ heroku config:set TZ=Europe/Berlin

    When i read out the phpinfo() at server-side the settings where UTC, so i decided to change the php.ini settings at Heroku. Here is an article from Heroku:

    https://devcenter.heroku.com/articles/custom-php-settings#php-runtime-settings

    By adding a .user.ini file to your web-root you can adapt the settings for your app. E.g. by adding the date.time setting:

    date.timezone = Europe/Berlin

    I know this is not the best solution for worldwide usage, but it works so far and my symfony app is only important for Central Europe now.

提交回复
热议问题