From: Derick Rethans Date: Mon, 15 Nov 2004 16:30:46 +0000 (+0000) Subject: - Fixed bug #28599 (strtotime fails with zero base time). X-Git-Tag: php-5.0.3RC1~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a379811d4fcbcd537474827972e02b4d0c02185;p=php - Fixed bug #28599 (strtotime fails with zero base time). --- diff --git a/NEWS b/NEWS index 8de4c36ecb..04aa003e17 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,7 @@ PHP NEWS - Fixed bug #29418 (double free when openssl_csr_new fails). (Kamesh Jayachandran). - Fixed bug #29211 (SoapClient doesn't request wsdl through proxy). (Rob) +- Fixed bug #28599 (strtotime fails with zero base time). (Derick) - Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul characters). (Moriyoshi) - Fixed bug #27798 (private / protected variables not exposed by diff --git a/ext/standard/parsedate.y b/ext/standard/parsedate.y index 6776550d24..b5eec08ea5 100644 --- a/ext/standard/parsedate.y +++ b/ext/standard/parsedate.y @@ -1079,7 +1079,7 @@ time_t php_parse_date(char *p, time_t *now) tm.tm_year = ToYear (date.yyYear) - TM_YEAR_ORIGIN + date.yyRelYear; tm.tm_mon = date.yyMonth - 1 + date.yyRelMonth; tm.tm_mday = date.yyDay + date.yyRelDay; - if (date.yyHaveTime /*|| (date.yyHaveRel && !date.yyHaveDate && !date.yyHaveDay) */) + if (date.yyHaveTime || (date.yyHaveRel && !date.yyHaveDate && !date.yyHaveDay)) { tm.tm_hour = ToHour (date.yyHour, date.yyMeridian); if (tm.tm_hour < 0)