#46732 [Csd]: mktime.year description is wrong

From: Date: Thu, 04 Dec 2008 13:40:55 +0000
Subject: #46732 [Csd]: mktime.year description is wrong
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131595@lists.php.net to get a copy of this message
ID: 46732 Updated by: rquadling@php.net Reported By: dynkin at gmail dot com Status: Closed Bug Type: Date/time related Operating System: linux PHP Version: PHP 5 Assigned To: derick New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. The documentation was changed to reflect this "issue". It looks like mktime is not actually the culprit here but the timelib/tm2unixtime code. Previous Comments: ------------------------------------------------------------------------ [2008-12-02 18:03:56] derick@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2008-12-02 17:06:24] derick@php.net This is a bug in the code though ------------------------------------------------------------------------ [2008-12-02 16:27:08] dynkin at gmail dot com Description: ------------ Documentation of mktime's year parameter states that > The number of the year, may be a two or four digit value, > with values between 0-69 mapping to 2000-2069 and > 70-100 to 1970-2000. But this part, 70-100 to 1970-2000, is not precise. As in the implementation in ext/date/php_date.c::php_mktime, the doc should read: "70-110 to 1970-2010", instead of, "70-100 to 1970-2000". Reproduce code: --------------- echo date("Y-m-d", mktime(0,0,0,1,1,110)); Actual result: -------------- 2010-01-01 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46732&edit=1

« previous php.bugs (#131595) next »