php.net |  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
Description:
------------
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:
----------------
1147453201
1147453200
1147453199
1147438799


Actual result:
--------------
1147453201
1147453200

1147438799


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-08 12:54 UTC] derick@php.net
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] 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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC