PHP wrong date/time

后端 未结 7 1286
南笙
南笙 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

    0 讨论(0)
提交回复
热议问题