From: bealdrid at gmail dot com
Operating system: Fedora 7
PHP version: 5.2.3
PHP Bug Type: Unknown/Other Function
Bug description: strtotime() not recognizing times before day
Description:
------------
when calling the strtotime() function and when passing a time before the
day such as "1pm yesterday" the wrong timestamp is returned, often midnite
of that particular day.
Reproduce code:
---------------
echo date('Y-m-d H:i:s',strtotime('1pm yesterday'));
Expected result:
----------------
The expected result would be
2007-07-08 13:00:00 and this works in php 4.3.9
If I put the time after the day, such as "yesterday 1pm", it behaves as
expected.
Actual result:
--------------
2007-07-08 00:00:00
--
Edit bug report at http://bugs.php.net/?id=41944&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41944&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41944&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41944&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41944&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41944&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41944&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41944&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41944&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41944&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41944&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41944&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41944&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41944&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41944&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41944&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41944&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41944&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41944&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41944&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41944&r=mysqlcfg