ID: 46641 Updated by: [EMAIL PROTECTED] Reported By: cross+php at distal dot com -Status: Open +Status: Verified Bug Type: Date/time related -Operating System: Linux +Operating System: * -PHP Version: 5.2.6 +PHP Version: 5CVS, 6CVS (2008-11-21)
Previous Comments: ------------------------------------------------------------------------ [2008-11-21 17:46:13] cross+php at distal dot com 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 this bug report at http://bugs.php.net/?id=46641&edit=1
