bjori Fri Jul 28 16:32:31 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c /php-src/ext/date/tests date_constants.phpt Log: Fix DateTime::RSS Update tests http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.19&r2=1.43.2.45.2.20&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.19 php-src/ext/date/php_date.c:1.43.2.45.2.20 --- php-src/ext/date/php_date.c:1.43.2.45.2.19 Thu Jul 20 15:49:02 2006 +++ php-src/ext/date/php_date.c Fri Jul 28 16:32:31 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.19 2006/07/20 15:49:02 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.20 2006/07/28 16:32:31 bjori Exp $ */ #include "php.h" #include "php_streams.h" @@ -1448,7 +1448,7 @@ REGISTER_DATE_CLASS_CONST_STRING("RFC1123", DATE_FORMAT_RFC1123); REGISTER_DATE_CLASS_CONST_STRING("RFC2822", DATE_FORMAT_RFC2822); REGISTER_DATE_CLASS_CONST_STRING("RFC3339", DATE_FORMAT_RFC3339); - REGISTER_DATE_CLASS_CONST_STRING("RSS", DATE_FORMAT_RFC822); + REGISTER_DATE_CLASS_CONST_STRING("RSS", DATE_FORMAT_RFC1123); REGISTER_DATE_CLASS_CONST_STRING("W3C", DATE_FORMAT_RFC3339); http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.1.2.5 php-src/ext/date/tests/date_constants.phpt:1.1.2.6 --- php-src/ext/date/tests/date_constants.phpt:1.1.2.5 Tue May 30 15:14:22 2006 +++ php-src/ext/date/tests/date_constants.phpt Fri Jul 28 16:32:31 2006 @@ -12,6 +12,7 @@ DATE_RFC1036, DATE_RFC1123, DATE_RFC2822, + DATE_RFC3339, DATE_RSS, DATE_W3C ); @@ -20,6 +21,22 @@ var_dump(date($const, strtotime("1 Jul 06 14:27:30 +0200"))); var_dump(date($const, strtotime("2006-05-30T14:32:13+02:00"))); } + + print "\n"; + + var_dump( + DATE_ATOM == DateTime::ATOM, + DATE_COOKIE == DateTime::COOKIE, + DATE_ISO8601 == DateTime::ISO8601, + DATE_RFC822 == DateTime::RFC822, + DATE_RFC850 == DateTime::RFC850, + DATE_RFC1036 == DateTime::RFC1036, + DATE_RFC1123 == DateTime::RFC1123, + DATE_RFC2822 == DateTime::RFC2822, + DATE_RFC3339 == DateTime::RFC3339, + DATE_RSS == DateTime::RSS, + DATE_W3C == DateTime::W3C + ); ?> --EXPECT-- string(25) "2006-07-01T14:27:30+02:00" @@ -38,7 +55,21 @@ string(31) "Tue, 30 May 2006 14:32:13 +0200" string(31) "Sat, 01 Jul 2006 14:27:30 +0200" string(31) "Tue, 30 May 2006 14:32:13 +0200" +string(25) "2006-07-01T14:27:30+02:00" +string(25) "2006-05-30T14:32:13+02:00" string(31) "Sat, 01 Jul 2006 14:27:30 +0200" string(31) "Tue, 30 May 2006 14:32:13 +0200" string(25) "2006-07-01T14:27:30+02:00" string(25) "2006-05-30T14:32:13+02:00" + +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php