Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21748 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41628 invoked by uid 1010); 31 Jan 2006 21:41:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41613 invoked from network); 31 Jan 2006 21:41:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2006 21:41:41 -0000 X-Host-Fingerprint: 66.249.82.201 xproxy.gmail.com Linux 2.4/2.6 Received: from ([66.249.82.201:3745] helo=xproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DF/85-23224-599DFD34 for ; Tue, 31 Jan 2006 16:41:41 -0500 Received: by xproxy.gmail.com with SMTP id t10so343wxc for ; Tue, 31 Jan 2006 13:41:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=V5kMbdMuxdVBpXliUSMXt3f5v5kChLs7DNyJPxJzCZW9YR/VpSf1epivhnBQS6gyLJCti9SlT7vFRRY5+YxHTMB4QYaXJSldBpVjMWgXNc1OySOpwmDPzmP1+eo78aKpElx58w0dAYgonvWw4XTkZarocsfo5ygqUoiPrZqc7MY= Received: by 10.70.10.20 with SMTP id 20mr4071287wxj; Tue, 31 Jan 2006 13:41:38 -0800 (PST) Received: by 10.70.42.19 with HTTP; Tue, 31 Jan 2006 13:41:38 -0800 (PST) Message-ID: <7f3ed2c30601311341p6803af68ye7dbad23720996fa@mail.gmail.com> Date: Tue, 31 Jan 2006 22:41:38 +0100 To: internals@lists.php.net, Derick Rethans In-Reply-To: <7f3ed2c30601311337i4028d9e3ye12f1916f442edd9@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_19469_19564982.1138743698269" References: <7f3ed2c30601311337i4028d9e3ye12f1916f442edd9@mail.gmail.com> Subject: Re: DATE_ISO8601 and the "c" date() character From: hannes.magnusson@gmail.com (Hannes Magnusson) ------=_Part_19469_19564982.1138743698269 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hmh. No. The patches weren't attached ;) On 1/31/06, Hannes Magnusson wrote: > Hi all > > I just noticed that the DATE_ISO8601 constant and the "c" date() > character don't give the same results. > The difference is that the "c" format prints colon in the timezone > offset, but the constant does not - both are however ISO8601 > compliant. > > Is this intentional? If not, I'd want to change the constant rather > then "c", since the "c" format has been there since 5.0 but the > constant since 5.1.1. > > Patch attached (and patch for phpdoc). > However! I think ISO8601 formats without the colon are more used.., > not sure if this should be changed at all.... > > - Hannes > ------=_Part_19469_19564982.1138743698269 Content-Type: text/plain; name=phpdoc.date.iso8601.patch.txt; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="phpdoc.date.iso8601.patch.txt" ? date.iso8601.patch.txt Index: constants.xml =================================================================== RCS file: /repository/phpdoc/en/reference/datetime/constants.xml,v retrieving revision 1.6 diff -u -r1.6 constants.xml --- constants.xml 31 Jan 2006 21:10:31 -0000 1.6 +++ constants.xml 31 Jan 2006 21:33:37 -0000 @@ -37,7 +37,7 @@ - ISO-8601 (example: 2005-08-15T15:52:01+0000) + ISO-8601 (example: 2005-08-15T15:52:01+00:00) ------=_Part_19469_19564982.1138743698269 Content-Type: text/plain; name=date.iso8601.patch.txt; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="date.iso8601.patch.txt" Index: php_date.c =================================================================== RCS file: /repository/php-src/ext/date/php_date.c,v retrieving revision 1.43.2.40 diff -u -r1.43.2.40 php_date.c --- php_date.c 31 Jan 2006 18:44:19 -0000 1.43.2.40 +++ php_date.c 31 Jan 2006 21:28:54 -0000 @@ -236,7 +236,7 @@ #define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db() #define DATE_FORMAT_RFC3339 "Y-m-d\\TH:i:sP" -#define DATE_FORMAT_ISO8601 "Y-m-d\\TH:i:sO" +#define DATE_FORMAT_ISO8601 "c" #define DATE_FORMAT_RFC1036 "l, d-M-y H:i:s T" #define DATE_FORMAT_RFC1123 "D, d M Y H:i:s T" #define DATE_FORMAT_RFC2822 "D, d M Y H:i:s O" ------=_Part_19469_19564982.1138743698269--