PHP wrong date/time

后端 未结 7 1339
南笙
南笙 2021-02-19 13:28

PHP date() & time() return incorrect time:

When date.timezone = \"Europe/Riga\" the time returned by date() was <

7条回答
  •  野性不改
    2021-02-19 14:21

    I had some problem with timezone too. This can be handy for someone.

    In my case, Chile Sumer Time CLST returned wrong timzeone offset.

    Updating the timezonedb worked for me.

    Go to: https://pecl.php.net/package/timezonedb

    For Widnows Download the newest version of dll, copy into "ext" directory. Edit the php.ini and put below line:

    extension=php_timezonedb.dll

    For Linux You can use :

    pecl install timezonedb

    and in php.ini put:

    extension=php_timezonedb.so

提交回复
热议问题