iliaa           Mon Dec  5 12:27:24 2005 EDT

  Modified files:              
    /php-src/ext/date/tests     mktime-3.phpt 
    /php-src/ext/date   php_date.c 
  Log:
  MFB51: Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly).
  
  
http://cvs.php.net/diff.php/php-src/ext/date/tests/mktime-3.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/date/tests/mktime-3.phpt
diff -u php-src/ext/date/tests/mktime-3.phpt:1.2 
php-src/ext/date/tests/mktime-3.phpt:1.3
--- php-src/ext/date/tests/mktime-3.phpt:1.2    Thu Nov 17 16:07:27 2005
+++ php-src/ext/date/tests/mktime-3.phpt        Mon Dec  5 12:27:24 2005
@@ -5,7 +5,7 @@
 --FILE--
 <?php
 $tzs = array("America/Toronto", "Europe/Oslo");
-$years = array(0, 69, 70, 71, 99, 100, 1900, 1901, 1902, 1999, 2000, 2001);
+$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 
2001);
 
 foreach ($tzs as $tz) {
        echo $tz, "\n";
@@ -30,6 +30,7 @@
 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: 1900 - out of range
 Y: 1901 - out of range
 Y: 1902 - January 1902-01-01T01:01:01-0500
@@ -44,6 +45,7 @@
 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: 1900 - out of range
 Y: 1901 - out of range
 Y: 1902 - January 1902-01-01T01:01:01+0100
http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.74&r2=1.75&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.74 php-src/ext/date/php_date.c:1.75
--- php-src/ext/date/php_date.c:1.74    Thu Dec  1 11:26:37 2005
+++ php-src/ext/date/php_date.c Mon Dec  5 12:27:24 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_date.c,v 1.74 2005/12/01 16:26:37 iliaa Exp $ */
+/* $Id: php_date.c,v 1.75 2005/12/05 17:27:24 iliaa Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -967,7 +967,7 @@
                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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to