ID: 43444 Updated by: [EMAIL PROTECTED] Reported By: anter dot x at gmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Windows XP PHP Version: 5.2.5 New Comment:
It's because mktime() defaults to the day of current date if the day parameter is omitted. From the manual page for mktime(): "Arguments may be left out in order from right to left; any arguments thus omitted will be set to the current value according to the local date and time." And as february this year had only 28 days and you're giving it 29, it overflows to march. No bug here. Previous Comments: ------------------------------------------------------------------------ [2007-11-29 10:34:56] anter dot x at gmail dot com Description: ------------ Function date('F', $timestamp) returns wrong month name. NOTE: print mktime(0, 0, 0, 2); // 1172700000 print mktime(0, 0, 0, 3); // 1175115600 Reproduce code: --------------- print date('F', mktime(0, 0, 0, 2)); print date('F', mktime(0, 0, 0, 3)); Expected result: ---------------- February March Actual result: -------------- March March ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43444&edit=1