date_default_timezone_get() differs from ini_get('date.timezone');

From: Date: Sun, 30 May 2010 09:05:00 +0000
Subject: date_default_timezone_get() differs from ini_get('date.timezone');
Groups: php.general 
Request: Send a blank email to php-general+get-305647@lists.php.net to get a copy of this message
Hi there i think i did not understand the timezone-settings right. In php.ini, i wrote date.timezone="Europe/Berlin". echo ini_get('date.timezone'); returns "Europe/Berlin". But the Class "DateTime" is using another timezone (Europe/London). When i do 'echo date_default_timezone_get()', it returns "Europe/London" and not the same as described in php.ini. In phpinfo() the date.timezone-setting will also be empty. I am sure to work with the right php.ini, due two facts: 1. phpinfo() displays the same ini and all settings from the file (but not timezone) 2. ini_get() returns the right setting as well (but it will not be used). Can somebody explain to me, what happens here? Thanks a lot and kind regards, Paul

« previous php.general (#305647) next »