Bug #75577 [Com]: DateTime::createFromFormat does not accept RFC3339_EXTENDED format
| From: | mail at ciaranmcnulty dot com | Date: | Mon, 08 Oct 2018 13:28:29 +0000 |
| Subject: | Bug #75577 [Com]: DateTime::createFromFormat does not accept RFC3339_EXTENDED format | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217471@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75577&edit=1
ID: 75577
Comment by: mail at ciaranmcnulty dot com
Reported by: php-bugs at dennis dot birkholz dot biz
Summary: DateTime::createFromFormat does not accept
RFC3339_EXTENDED format
Status: Assigned
Type: Bug
Package: Date/time related
Operating System: Linux
PHP Version: 7.2.0RC6
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
We just got hit by this too - it looks like support for
v and the constant were added
for format(), but no changes in createFromFormat (and nothing on the docs pages about
v).
It's not apparent to someone using the constant why anything would be wrong
Previous Comments:
------------------------------------------------------------------------
[2018-04-19 10:02:15] rdohms@php.net
This appears to be due to lack of support for v which is part of RFC3339_EXTENDED, so
this ticket could be renamed to include that information and cover a broader lack of the feature.
------------------------------------------------------------------------
[2018-01-15 16:18:49] rob dot bast at gmail dot com
Sorry that should have been https://3v4l.org/N3UgG *
------------------------------------------------------------------------
[2018-01-15 16:17:23] rob dot bast at gmail dot com
Yeah I ran into this too today :-(
https://3v4l.org/jFOkA
------------------------------------------------------------------------
[2017-11-29 16:55:52] martin at algorhythm dot de
I have exactly the same problem with another datestring. The datestring I used is
'2017-11-29T15:10:24.123+01:00'.
IMHO I have to use \DateTime::RFC3339_EXTENDED. When I call
\DateTime::format(RFC3339_EXTENDED) it results exactly in my used datestring.
See: https://3v4l.org/TK1oK
------------------------------------------------------------------------
[2017-11-27 19:28:22] mariano@php.net
PHP's PR with failing test: https://github.com/php/php-src/pull/2945
Fix in timelib: https://github.com/derickr/timelib/pull/29
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=75577
--
Edit this bug report at https://bugs.php.net/bug.php?id=75577&edit=1