From: cross+php at distal dot com Operating system: Linux PHP version: 5.2.6 PHP Bug Type: Date/time related Bug description: Timezone format inconsistencies between date() and DateTime::format()
Description: ------------ When using some of the timezone output format characters, notably "e" and "T", produce different results on a DateTime built from a string time and calling date() on the results of strtotime(). Reproduce code: --------------- <?php $timestr = "2008-11-19 10:51:35.199665-05"; $outformat = "M j Y H:i:s T (e,I,O,P,T,Z)"; $obj = new DateTime($timestr); print date($outformat, strtotime($timestr)) . "\n"; print $obj->format($outformat) . "\n"; ?> Expected result: ---------------- Nov 19 2008 10:51:35 EST (America/New_York,0,-0500,-05:00,EST,-18000) Nov 19 2008 10:51:35 EST (America/New_York,0,-0500,-05:00,EST,-18000) Actual result: -------------- Nov 19 2008 10:51:35 EST (America/New_York,0,-0500,-05:00,EST,-18000) Nov 19 2008 10:51:35 GMT-0500 (-05:00,0,-0500,-05:00,GMT-0500,-18000) -- Edit bug report at http://bugs.php.net/?id=46641&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46641&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46641&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46641&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46641&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46641&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46641&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46641&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46641&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46641&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46641&r=support Expected behavior: http://bugs.php.net/fix.php?id=46641&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46641&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46641&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46641&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46641&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46641&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46641&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46641&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46641&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46641&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46641&r=mysqlcfg
