From: Operating system: Linux/Ubuntu PHP version: Irrelevant Package: Date/time related Bug Type: Bug Bug description:date_default_timezone_get() returns incorrect timezone
Description: ------------ We noticed a discrepancy between PHP and the server timezones, and found that one four different servers (with two different versions of PHP - 5.2.4 and 5.3.2) the server was set to Australia/Adelaide (ACST), but this date_default_timezone_get() was returning Asia/Jayapura (EIT). There is no value in date.timezone (it is commented out) in the CLI and Apache PHP configuration files - so according to the documentation, PHP should be getting the timezone from the server configuration. Why is it getting this random Asia/Jayapura value? --- >From manual page: http://www.php.net/function.date-default-timezone-get#Description --- Test script: --------------- echo date_default_timezone_get(); Expected result: ---------------- The correct timezone - not Asia/Jayapura when the server is set to Australia/Adelaide Actual result: -------------- Asia/Jayapura -- Edit bug report at http://bugs.php.net/bug.php?id=54481&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54481&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54481&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54481&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54481&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54481&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54481&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54481&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54481&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54481&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54481&r=support Expected behavior: http://bugs.php.net/fix.php?id=54481&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54481&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54481&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54481&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54481&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54481&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54481&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54481&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54481&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54481&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54481&r=mysqlcfg