|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67793 DateTime DD MM
Submitted: 2014-08-06 05:33 UTC Modified: 2014-08-06 05:38 UTC
From: mr-yellow at mr-yellow dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.4.31 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mr-yellow at mr-yellow dot com
New email:
PHP Version: OS:


 [2014-08-06 05:33 UTC] mr-yellow at mr-yellow dot com
From manual page:

Following the conventions on this page, DateTime responds differently.

$created = \DateTime::createFromFormat('U',$created);
$created = $created->format('DD/MM/YY');


Test script:
$created = \DateTime::createFromFormat('U',1407297720);
$created = $created->format('DD/MM/YY');
echo $created;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-06 05:38 UTC]
-Status: Open +Status: Not a bug
 [2014-08-06 05:38 UTC]
Those are input formats only; the format strings you can provide to DateTime::format() and date() are documented at
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 04:01:31 2024 UTC