How to update timezonedb in PHP (updating timezones info)?

前端 未结 4 1341
梦谈多话
梦谈多话 2020-12-03 18:07

phpinfo() shows our system to be using \"\"Olson\" Timezone Database Version 2010.3\". I think that is now out of date, but can\'t locate an authoritative locatio

4条回答
  •  旧时难觅i
    2020-12-03 18:51

    To do a complete timezone update (We had problems with incorrect Russia / Moscow timezone):

    #for OS - CentOS and MySQL
    yum update tzdata
    mysql_tzinfo_to_sql /usr/share/zoneinfo
    #for PHP
    pecl upgrade timezonedb
    pecl upgrade intl
    
    #dependencies you may need for the above:
    yum install gcc 
    yum install gcc-c++
    yum install libicu-devel
    

提交回复
热议问题