|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #26694 strtotime fails on 'Sun, 21 Dec 2003 20:38:33 +0000 GMT'
Submitted: 2003-12-22 12:46 UTC Modified: 2005-06-20 09:23 UTC
Avg. Score:3.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: phpbug at thequod dot de Assigned: derick (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 4.3.4 OS: Windows XP
Private report: No CVE-ID: None
 [2003-12-22 12:46 UTC] phpbug at thequod dot de
I use strtotime to decode the If-Modified-Since header and just noticed that Firebird puts and offset in front of the "GMT". I don't know if this is RFC conform, but it should be recognized by strtotime(), IMHO.

Reproduce code:
var_dump(strtotime('Sun, 21 Dec 2003 20:38:33 +0000 GMT'));

Expected result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-22 13:29 UTC] phpbug at thequod dot de
summary: it fails on
$d = gmdate("r") . ' GMT';
var_dump( strtotime($d) );
 [2003-12-22 16:52 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

You can either define the timezone by +dddd or by the 3-char identifier of that timezone. Your format isn\'t defined by the syntax - for further readings see

 [2004-04-25 11:39 UTC]
That doesn't mean we can't support it :)
 [2004-08-05 00:21 UTC] joelgphp at gadgetwiz dot com
The "+0000 GMT" format is also used by the Blackberry email client[s]. I've opened a ticket with them to fix the problem; however, because the issue seems to keep coming up, it should be parsed by the strtotime function even if it is not technically compliant.
 [2005-06-20 09:23 UTC]
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
Thank you for the report, and for helping us make PHP better.

Fixed for PHP 5.1.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 07:01:31 2024 UTC