|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-08-05 13:10 UTC] john dot oconnor at landingnet dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 04:00:01 2025 UTC |
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