|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37017 strtotime fails before 13:00:00 with some time zones identifiers
Submitted: 2006-04-08 12:22 UTC Modified: 2006-04-11 18:04 UTC
From: jerdonek at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.1.2 OS: Mac OS X 10.3.9
Private report: No CVE-ID: None
 [2006-04-08 12:22 UTC] jerdonek at gmail dot com
strtotime() returns no output when the time part of the 
date-time is between 00:00:00 and 13:00:00 and the time 
zone identifier is America/New_York for example.  The 
error does not occur for GMT for example.

Reproduce code:
echo strtotime("2006-05-12 13:00:01 America/New_York") . "<br>";
echo strtotime("2006-05-12 13:00:00 America/New_York") . "<br>";
echo strtotime("2006-05-12 12:59:59 America/New_York") . "<br>";
echo strtotime("2006-05-12 12:59:59 GMT") . "<br>";

Expected result:

Actual result:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-08 12:54 UTC]
I've a patch for this, but have to check some other things first before committing. THe reason for this is that the parser saw "12:59:59 Am" as a 12h time notation... and "eric" is not a valid timezone identifier...
 [2006-04-11 18:04 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.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Aug 19 03:01:27 2019 UTC