From:             
Operating system: Linux Debian 5.0
PHP version:      5.3.5
Package:          Date/time related
Bug Type:         Bug
Bug description:date.timezone in php.ini ignored

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 bug report at http://bugs.php.net/bug.php?id=54080&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54080&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54080&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54080&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54080&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54080&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54080&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54080&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54080&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54080&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54080&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54080&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54080&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54080&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54080&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54080&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54080&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54080&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54080&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54080&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54080&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54080&r=mysqlcfg

Reply via email to