ID: 50879 Updated by: ahar...@php.net Reported By: lehn at planet-ic dot de -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 If the day parameter is omitted when calling mktime(), the current day is used. Since today is the 29th of January, and February only has 28 days this year, this effectively results in the first call being mktime(0, 0, 0, 2, 29), and Feburary 29 is implicitly converted to March 1. Previous Comments: ------------------------------------------------------------------------ [2010-01-29 11:16:14] lehn at planet-ic dot de Description: ------------ mktime produces wrong month for february if no day parameter given. Reproduce code: --------------- echo strftime("%B(%m)\n",mktime(0,0,0,2)); echo strftime("%B(%m)\n",mktime(0,0,0,2,1)); Expected result: ---------------- February(02) February(02) Actual result: -------------- March(03) February(02) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50879&edit=1