Doc #80022 [Opn->Fbk]: Inconsistency DateTimeInterface::ISO8601
Edit report at https://bugs.php.net/bug.php?id=80022&edit=1
ID: 80022
Updated by: requinix@php.net
Reported by: pablo at antweb dot es
Summary: Inconsistency DateTimeInterface::ISO8601
-Status: Open
+Status: Feedback
Type: Documentation Problem
-Package: Documentation problem
+Package: Date/time related
PHP Version: 7.4.9
Block user comment: N
Private report: N
New Comment:
That's right, 'O' does not have a colon while the timezone offset in 'c'
does.
What bug are you reporting?
Previous Comments:
------------------------------------------------------------------------
[2020-08-26 21:40:49] pablo at antweb dot es
Description:
------------
In https://www.php.net/manual/en/class.datetime.php
we have
const string DateTimeInterface::ISO8601 = "Y-m-d\TH:i:sO" ;
The format 0 = Difference to Greenwich time (GMT) without colon between hours and minutes Example:
+0200 (https://www.php.net/manual/en/datetime.format.php)
But the format('c') full date/time define:
c ISO 8601 date (added in PHP 5) 2004-02-12T15:19:21+00:00
We can to see that the format is inconsistency, format "c" is not equal to Y-m-d\TH:i:sO
it would be 2004-02-12T15:19:21+0000
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80022&edit=1
Thread (6 messages)