ID: 41842
Updated by: [EMAIL PROTECTED]
Reported By: mattsch at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: Gentoo Linux 2007.0
PHP Version: 5.2.3
-Assigned To:
+Assigned To: derick
New Comment:
The current code was not meant to do this, so it's not a real "bug" -
however, I'll check whether we can support this without breaking
something else.
Previous Comments:
------------------------------------------------------------------------
[2007-06-28 16:36:44] mattsch at gmail dot com
Description:
------------
When attempting to create a new date with a negative year and display
that date, the format function returns today's date with the timezone
offset modified and set to what the negative year should be.
Reproduce code:
---------------
<?
$date = new DateTime('-2007-06-28');
echo $date->format(DATE_ISO8601);
?>
Expected result:
----------------
Output:
-2007-06-28T11:31:19-0500
Actual result:
--------------
Outputs:
2007-06-28T11:31:19-2007
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41842&edit=1