Edit report at http://bugs.php.net/bug.php?id=54080&edit=1
ID: 54080 Updated by: der...@php.net Reported by: huan at huan dot pl Summary: date.timezone in php.ini ignored -Status: Open +Status: Feedback Type: Bug Package: Date/time related Operating System: Linux Debian 5.0 PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: Are you using Debian's packages? Previous Comments: ------------------------------------------------------------------------ [2011-02-23 15:42:07] huan at huan dot pl > it shows the right time with 'date' I meant 'date' command in shell ------------------------------------------------------------------------ [2011-02-23 15:41:03] huan at huan dot pl > it shows the right time with 'date' I meant 'date' command in shell ------------------------------------------------------------------------ [2011-02-23 15:39:31] huan at huan dot pl Description: ------------ Value of "date.timezone" is being ignored and PHP uses US/Central all the time. The system is set to use 'Europe/Warsaw' timezone and it shows the right time with 'date' command. In php.ini I have: --- CUT --- [Date] date.timezone = 'Europe/Warsaw' --- CUT --- But the result of the test script is: Server timezone in php.ini is = US/Central Location of php.ini is /usr/local/etc/php5/cgi/php.ini and I had modified the right php.ini, the value of date.timezone is just being ignored and I have no idea why it uses 'US/Central' since the whole system uses other timezone Test script: --------------- <?php $script_tz = date_default_timezone_get(); if (strcmp($script_tz, ini_get('date.timezone'))) { echo "Script timezone differs from ini-set timezone.<br>\n"; if (ini_get('date.timezone')=="") { echo "Server timezone in php.ini is = not set."; }else{ echo "Server timezone in php.ini is = ".ini_get('date.timezone'); } } else { echo 'Script timezone and ini-set timezone match.'; } echo date("d/m/Y H:i:s"); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54080&edit=1