php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45459 date_create_from_format() fails on DATE_RFC3339
Submitted: 2008-07-08 15:45 UTC Modified: 2008-07-08 20:25 UTC
From: php at benjaminschulz dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.3CVS-2008-07-08 (CVS) OS: linux / darwin
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at benjaminschulz dot com
New email:
PHP Version: OS:

 

 [2008-07-08 15:45 UTC] php at benjaminschulz dot com
Description:
------------
date_create_from_format() is unable to parse DATE_RFC3339

Reproduce code:
---------------
<?php
$date = new ::DateTime;
$otherdate = date_create_from_format(DATE_RFC3339, $date->format(DATE_RFC3339));
var_dump($otherdate);

Expected result:
----------------
A ::DateTime object

Actual result:
--------------
false

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-08 16:26 UTC] derick@php.net
It's not really a bug, the specifiers used are not 100% the same, but I'll see if I can make it work better.
 [2008-07-08 20:25 UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Feb 11 11:00:01 2026 UTC