php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45173 strftime formatting on datetime objects
Submitted: 2008-06-04 12:23 UTC Modified: 2016-12-31 00:20 UTC
Votes:17
Avg. Score:4.6 ± 0.8
Reproduced:14 of 14 (100.0%)
Same Version:7 (50.0%)
Same OS:7 (50.0%)
From: peter dot bex at solide-ict dot nl Assigned:
Status: Open Package: Date/time related
PHP Version: 5.2.6 OS: N/A
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: peter dot bex at solide-ict dot nl
New email:
PHP Version: OS:

 

 [2008-06-04 12:23 UTC] peter dot bex at solide-ict dot nl
Description:
------------
1) The regular 'format' method on datetime objects only accepts date() syntax, which is severely limited in what you can do with it. The strftime syntax is more powerful.

2) As discussed in bug 45167, there's no way to call strftime using datetime object values reliably, because there are ways to create datetime objects with bogus timezone objects (objects which can not be recreated nor can their names be passed to date_default_timezone_set).

Because of 1) and 2), there is a need to get strftime integrated in the datetime class.

Reproduce code:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A

Patches

anita-strftime-to-dateformat (last revision 2011-01-11 11:21 UTC) by anitamourya at yahoo dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:20 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Date/time related
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC