bjori Tue May 30 15:14:22 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c /php-src/ext/date/tests date_constants.phpt Log: MFH: Play nice, use 4digit years in DATE_RSS http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.5&r2=1.43.2.45.2.6&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.5 php-src/ext/date/php_date.c:1.43.2.45.2.6 --- php-src/ext/date/php_date.c:1.43.2.45.2.5 Tue May 30 14:46:45 2006 +++ php-src/ext/date/php_date.c Tue May 30 15:14:22 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.5 2006/05/30 14:46:45 bjori Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.6 2006/05/30 15:14:22 bjori Exp $ */ #include "php.h" #include "php_streams.h" @@ -341,10 +341,10 @@ #endif /* * RFC4287, Section 3.3: http://www.ietf.org/rfc/rfc4287.txt - * A Date construct is an element whose content MUST conform to the - * "date-time" production in [RFC3339]. In addition, an uppercase "T" - * character MUST be used to separate date and time, and an uppercase - * "Z" character MUST be present in the absence of a numeric time zone offset. + * A Date construct is an element whose content MUST conform to the + * "date-time" production in [RFC3339]. In addition, an uppercase "T" + * character MUST be used to separate date and time, and an uppercase + * "Z" character MUST be present in the absence of a numeric time zone offset. */ REGISTER_STRING_CONSTANT("DATE_ATOM", DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); /* @@ -363,9 +363,10 @@ REGISTER_STRING_CONSTANT("DATE_RFC3339", DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); /* * RSS 2.0 Specification: http://blogs.law.harvard.edu/tech/rss - * "All date-times in RSS conform to the Date and Time Specification of RFC 822" + * "All date-times in RSS conform to the Date and Time Specification of RFC 822, + * with the exception that the year may be expressed with two characters or four characters (four preferred)" */ - REGISTER_STRING_CONSTANT("DATE_RSS", DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("DATE_RSS", DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT("DATE_W3C", DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SUNFUNCS_RET_TIMESTAMP", SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.1.2.4&r2=1.1.2.5&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.4 php-src/ext/date/tests/date_constants.phpt:1.1.2.5 --- php-src/ext/date/tests/date_constants.phpt:1.1.2.4 Tue May 30 14:46:46 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 15:14:22 2006 @@ -38,7 +38,7 @@ 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(29) "Sat, 01 Jul 06 14:27:30 +0200" -string(29) "Tue, 30 May 06 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"
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php