ID:               41842
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mattsch at gmail dot com
 Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: Gentoo Linux 2007.0
 PHP Version:      5.2.3
 Assigned To:      derick
 New Comment:

Sure you can.  But of course a leading 0 indicates an octal number, so
099 is not a valid number.  


Previous Comments:
------------------------------------------------------------------------

[2007-06-29 17:22:43] mattsch at gmail dot com

I have discovered that it is also unable to create years between 0000
and 0099.

------------------------------------------------------------------------

[2007-06-28 18:17:04] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------

[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

Reply via email to