#50344 [Opn->Bgs]: Incorrect Month Returned

From: Date: Mon, 30 Nov 2009 22:48:33 +0000
Subject: #50344 [Opn->Bgs]: Incorrect Month Returned
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145247@lists.php.net to get a copy of this message
ID: 50344 Updated by: jani@php.net Reported By: info at demonwares dot com -Status: Open +Status: Bogus -Bug Type: *General Issues +Bug Type: Date/time related Operating System: lynix PHP Version: 5.3.1 New Comment: # php -n -d date.timezone="Europe/Helsinki" -r 'echo date("F", mktime(0, 0, 0, 2) ), "\n";' February It does return february. But if you omit the day/year, then mktime() uses the current day/year. RTFM: http://php.net/mktime Previous Comments: ------------------------------------------------------------------------ [2009-11-30 22:44:01] info at demonwares dot com Description: ------------ Code returns the wrong month name Reproduce code: --------------- date( 'F', mktime(0, 0, 0, 2) ) Expected result: ---------------- This should return February Actual result: -------------- This returns March ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50344&edit=1

« previous php.bugs (#145247) next »