Doc #67793 [NEW]: DateTime DD MM
| From: | mr-yellow at mr-yellow dot com | Date: | Wed, 06 Aug 2014 05:33:46 +0000 |
| Subject: | Doc #67793 [NEW]: DateTime DD MM | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11413@lists.php.net to get a copy of this message | ||
From: mr-yellow at mr-yellow dot com
Operating system:
PHP version: 5.4.31
Package: Date/time related
Bug Type: Documentation Problem
Bug description:DateTime DD MM
Description:
------------
---
From manual page: http://www.php.net/datetime.formats.date
---
Following the conventions on this page, DateTime responds differently.
$created = \DateTime::createFromFormat('U',$created);
$created = $created->format('DD/MM/YY');
WedWed/AugAug/20142014
Test script:
---------------
$created = \DateTime::createFromFormat('U',1407297720);
$created = $created->format('DD/MM/YY');
echo $created;
Expected result:
----------------
06/08/2014
Actual result:
--------------
WedWed/AugAug/20142014
--
Edit bug report at https://bugs.php.net/bug.php?id=67793&edit=1
--