derick Tue Dec 2 18:02:16 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/date php_date.c
/php-src/ext/date/tests mktime-3-64bit.phpt
Log:
- MFH: Fixed bug #46732 (mktime.year description is wrong).
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.60&r2=1.43.2.45.2.51.2.61&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.60
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.61
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.60 Wed Nov 19 02:00:53 2008
+++ php-src/ext/date/php_date.c Tue Dec 2 18:02:16 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.60 2008/11/19 02:00:53 colder Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.61 2008/12/02 18:02:16 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -1433,7 +1433,7 @@
case 6:
if (yea >= 0 && yea < 70) {
yea += 2000;
- } else if (yea >= 70 && yea <= 110) {
+ } else if (yea >= 70 && yea <= 100) {
yea += 1900;
}
now->y = yea;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3-64bit.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/date/tests/mktime-3-64bit.phpt
diff -u php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.2.2
php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.2.3
--- php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.2.2 Mon Feb 25 22:32:59 2008
+++ php-src/ext/date/tests/mktime-3-64bit.phpt Tue Dec 2 18:02:16 2008
@@ -7,7 +7,7 @@
--FILE--
<?php
$tzs = array("America/Toronto", "Europe/Oslo");
-$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000,
2001);
+$years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999,
2000, 2001);
foreach ($tzs as $tz) {
echo $tz, "\n";
@@ -32,7 +32,9 @@
Y: 71 - January 1971-01-01T01:01:01-0500
Y: 99 - January 1999-01-01T01:01:01-0500
Y: 100 - January 2000-01-01T01:01:01-0500
-Y: 105 - January 2005-01-01T01:01:01-0500
+Y: 101 - January 0101-01-01T01:01:01-0500
+Y: 105 - January 0105-01-01T01:01:01-0500
+Y: 110 - January 0110-01-01T01:01:01-0500
Y: 1900 - January 1900-01-01T01:01:01-0500
Y: 1901 - January 1901-01-01T01:01:01-0500
Y: 1902 - January 1902-01-01T01:01:01-0500
@@ -47,7 +49,9 @@
Y: 71 - January 1971-01-01T01:01:01+0100
Y: 99 - January 1999-01-01T01:01:01+0100
Y: 100 - January 2000-01-01T01:01:01+0100
-Y: 105 - January 2005-01-01T01:01:01+0100
+Y: 101 - January 0101-01-01T01:01:01+0100
+Y: 105 - January 0105-01-01T01:01:01+0100
+Y: 110 - January 0110-01-01T01:01:01+0100
Y: 1900 - January 1900-01-01T01:01:01+0100
Y: 1901 - January 1901-01-01T01:01:01+0100
Y: 1902 - January 1902-01-01T01:01:01+0100
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php