From: mad at dactar dot ch Operating system: HP-UX PHP version: 5.1.5 PHP Bug Type: PDO related Bug description: timezone difference between PDO/Sqlite and PHP
Description: ------------ The date.timezone option defined in php.ini has no effect on PDO/Sqlite. date.timezone = Europe/Zurich Reproduce code: --------------- <? echo "<pre>"; echo ' PHP : ' . date("Y-m-j G:i:s"); date("D M j G:i:s T Y"); echo "<BR>"; echo ' UNIX : '; passthru("date '+%Y-%m-%d %H:%M:%S'"); echo "<BR>"; echo 'PDO/Sqlite : '; $db = new PDO("sqlite::memory:"); $query="select datetime('now')"; $row = $db->query($query); $result=$row->fetch(PDO::FETCH_NUM); echo $result[0]; ?> Expected result: ---------------- PHP : 2006-08-21 17:49:24 UNIX : 2006-08-21 17:49:24 PDO/Sqlite : 2006-08-21 17:49:24 Actual result: -------------- PHP : 2006-08-21 17:49:24 UNIX : 2006-08-21 17:49:24 PDO/Sqlite : 2006-08-21 15:49:24 -- Edit bug report at http://bugs.php.net/?id=38537&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38537&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38537&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38537&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38537&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38537&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38537&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38537&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38537&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38537&r=support Expected behavior: http://bugs.php.net/fix.php?id=38537&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38537&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38537&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38537&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38537&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38537&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38537&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38537&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38537&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38537&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38537&r=mysqlcfg