ID: 45725
User updated by: john dot oconnor at landingnet dot co dot uk
Reported By: john dot oconnor at landingnet dot co dot uk
-Status: Open
+Status: Closed
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.2.6
New Comment:
submitted in error
Previous Comments:
------------------------------------------------------------------------
[2008-08-05 12:53:44] john dot oconnor at landingnet dot co dot uk
Description:
------------
When using date_create to find out the day of the year for a given date
using the date string format 'z', you expect a result from 0-365.
When testing 2008-01-02 you get the expected result 1.
With 2008-01-01 the format returns null, incorrectly.
Reproduce code:
---------------
$date_time = date_create('2008-01-01 00:00:00');
$formatted_time = $date_time->format('z');
var_dump($formatted_time);
Expected result:
----------------
integer of value zero.
Actual result:
--------------
null
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45725&edit=1