Doc #70115 [Opn]: DATE_ISO8601 const not compatible with ISO standard
| From: | adambro at o2 dot pl | Date: | Wed, 22 Jul 2015 14:13:20 +0000 |
| Subject: | Doc #70115 [Opn]: DATE_ISO8601 const not compatible with ISO standard | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12539@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
User updated by: adambro at o2 dot pl
Reported by: adambro at o2 dot pl
Summary: DATE_ISO8601 const not compatible with ISO standard
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: N/A
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Expected result:
Add a warning in documentation that DATE_ISO8601 is not compatible with that standard, hence other
languages (Java, JS).
Previous Comments:
------------------------------------------------------------------------
[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