LipESprY Posted January 30, 2020 Report Share Posted January 30, 2020 Hello everyone! I'm from Brazil and have a problem: the PHP time is 1 hour after local server (my pc). The timezone in the php.ini file is "America/Sao_Paulo" (my correct timezone). I've found the timezone database dll to update them in https://pecl.php.net/package/timezonedb/2019.3/windows, but not works. The php is not loading the php_timezonedb.dll. Yes, I've putted it in php.ini file. Recently, Brazil abolished DST in 2019 (https://en.wikipedia.org/wiki/Daylight_saving_time_in_Brazil). But it isn't updated in this timezone database. I'm using UniServer Zero XIII with new PHP 7.4. But I've tested too with PHP 7.1 and the problem persists. PS: the mariadb is correct time. <?php timezone_version_get(); // 2019.1 date_default_timezone_get(); // America/Sao_Paulo ini_get('date.timezone'); // America/Sao_Paulo date('Y-m-d H:i:s'); // 2020-01-30 14:40:12 Thanks Quote Link to comment Share on other sites More sharing options...
LipESprY Posted January 31, 2020 Author Report Share Posted January 31, 2020 SOLVED! When I read the Apache's logs, identified the different module between PHP 7.4 and downloaded timezone database (DLL). PHP Warning: PHP Startup: timezonedb: Unable to initialize module\nModule compiled with module API=20190902\nPHP compiled with module API=20190529\nThese options need to match\n in Unknown on line 0 The PHP 7.4 used in this version of UniServer (XIII) is development version (alpha or beta [-dev suffix]) released 6 months ago. When the official PHP 7.4 was released in November 28th, 19. Solution: Now, I'm using the UniServer Zero XIV with PHP 7.4 as default version. It uses 2019.3 timezone database' version and datetime is now correct. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.