ID: 50619 Updated by: der...@php.net Reported By: klevisi at gmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: linux PHP Version: 5.2.12 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The "o" specifier is for the "ISO Year", see http://en.wikipedia.org/wiki/ISO_year#Relation_with_the_Gregorian_calendar for what that means. You probably want to use "Y" instead. Previous Comments: ------------------------------------------------------------------------ [2009-12-31 11:26:58] klevisi at gmail dot com Description: ------------ When the year changes it displays not the expected results Reproduce code: --------------- <?php for($i=0; $i<7; $i++) { echo date("o-m-d", mktime() + $i * 86400); echo '<br />'; } ?> Expected result: ---------------- 2009-12-31 2010-01-01 2010-01-02 2010-01-03 2010-01-04 2010-01-05 2010-01-06 Actual result: -------------- 2009-12-31 2009-01-01 2009-01-02 2009-01-03 2010-01-04 2010-01-05 2010-01-06 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50619&edit=1