Doc #70115 [Opn->Csd]: DATE_ISO8601 const not compatible with ISO standard
| From: | cmb@php.net | Date: | Thu, 27 Aug 2015 14:14:34 +0000 |
| Subject: | Doc #70115 [Opn->Csd]: DATE_ISO8601 const not compatible with ISO standard | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12670@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70115&edit=1
ID: 70115
Updated by: cmb@php.net
Reported by: adambro at o2 dot pl
Summary: DATE_ISO8601 const not compatible with ISO standard
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: N/A
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2015-08-27 14:13:58] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=337646
Log: DATE_ISO8601 is not compatible with ISO-8601 (fixes #70115)
------------------------------------------------------------------------
[2015-07-23 08:19:56] derick@php.net
But we can't change the constant, so it needs to be documented.
------------------------------------------------------------------------
[2015-07-22 14:52:46] cmb@php.net
Not sure, if that is a *documentation* problem. The format "c" is
properly described as "ISO 8601 date", but DATE_ISO8601 works
slightly different. That is inconsistent at best.
------------------------------------------------------------------------
[2015-07-22 14:13:20] adambro at o2 dot pl
Expected result:
Add a warning in documentation that DATE_ISO8601 is not compatible with that standard, hence other
languages (Java, JS).
------------------------------------------------------------------------
[2015-07-22 14:11:25] adambro at o2 dot pl
Description:
------------
---
From manual page: http://www.php.net/class.datetime
---
The constant DATE_ISO8601 is not compatible with ISO standard. The standard says in extended format
(with colons) everything has to be in that notation, so having timezone represented as
"+0000" (O in const string) is invalid. It should be "+00:00" (P in const).
There's a #55272 bug, but it was closed due to wrong premise that basic format can be mixed
with extended one.
It is being explained in the comment already:
http://php.net/manual/en/class.datetime.php#116085
Using date("c") yields correct format, also DATE_RFC3339 seem to be compatible.
I've stumbled upon the bug while exchanging data with Java system.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70115&edit=1