Bug #72410 [Fbk->NoF]: DateTime::format() displays char "T" when use DateTime::ATOM for parameter
| From: | php-bugs at lists dot php dot net | Date: | Sun, 26 Jun 2016 04:22:33 +0000 |
| Subject: | Bug #72410 [Fbk->NoF]: DateTime::format() displays char "T" when use DateTime::ATOM for parameter | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13624@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72410&edit=1
ID: 72410
Updated by: php-bugs@lists.php.net
Reported by: nask0 at cod3r dot net
Summary: DateTime::format() displays char "T" when use
DateTime::ATOM for parameter
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Documentation problem
Operating System: Fedora
PHP Version: 5.6.22
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2016-06-15 10:53:13] derick@php.net
The actual result is correct, it should show the literal "T". Where in the documentation
does it say it should be the timezone abbreviation?
------------------------------------------------------------------------
[2016-06-15 09:59:31] nask0 at cod3r dot net
Description:
------------
When use \DateTime::format() with \DateTime::ATOM parameter, it displays char "T" instead
of timezone abbreviation as described in manual.
Consider test script, it is pretty self-explanatory.
Test script:
---------------
<?php
$date = new \DateTime( 'now', new \DateTimeZone('UTC') );
echo "\DateTime::ATOM format : " . $date->format( \DateTime::ATOM )."\n";
echo "'Y-m-d\TH:i:sP' format : " . $date->format(
'Y-m-d\TH:i:sP')."\n";
echo "Y-m-d T H:i:sP format : " . $date->format( "Y-m-d T
H:i:sP")."\n";
Expected result:
----------------
\DateTime::ATOM format : 2016-06-15\UTC09:57:38+00:00
'Y-m-d\TH:i:sP' format : 2016-06-15\UTC09:57:38+00:00
Y-m-d T H:i:sP format : 2016-06-15 UTC 09:57:38+00:00
Actual result:
--------------
\DateTime::ATOM format : 2016-06-15T09:57:38+00:00
'Y-m-d\TH:i:sP' format : 2016-06-15T09:57:38+00:00
Y-m-d T H:i:sP format : 2016-06-15 UTC 09:57:38+00:00
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72410&edit=1