From: Ilia Alshanetsky Date: Mon, 5 Dec 2005 17:27:02 +0000 (+0000) Subject: Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). X-Git-Tag: php-5.1.2RC1~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=937e9f801d22c6542c2ab22e3c0b5c2dcce5fc17;p=php Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). --- diff --git a/NEWS b/NEWS index 76ffb98756..3df4c670ef 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ PHP NEWS - Fixed many bugs in OCI8. (Tony) - Fixed crash and leak in mysqli when using 4.1.x client libraries and connecting to 5.x server. (Andrey) +- Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). (Ilia) - Fixed bug #35543 (php crash when calling non existing method of a class that extends PDO). (Tony) - Fixed bug #35539 (typo in error message for ErrorException). (Tony) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index e27ebf1d58..0ca617b719 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -860,7 +860,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt) case 6: if (yea >= 0 && yea < 70) { yea += 2000; - } else if (yea >= 70 && yea <= 100) { + } else if (yea >= 70 && yea <= 110) { yea += 1900; } now->y = yea; diff --git a/ext/date/tests/mktime-3.phpt b/ext/date/tests/mktime-3.phpt index d4ccfbabe4..0d19074fc3 100644 --- a/ext/date/tests/mktime-3.phpt +++ b/ext/date/tests/mktime-3.phpt @@ -5,7 +5,7 @@ error_reporting=2047 --FILE--