ID:               35983
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tim at komta dot com
-Status:           Assigned
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Windows XP Pro, Server 2003
 PHP Version:      5.1.2
 Assigned To:      derick
 New Comment:

This is proper behavior. In the past PHP has been inconsistent
regarding different terms like this. With the new code in PHP 5.1 this
all works the same. What you want to do is by using:

"-1 day" or "1 day ago".


Previous Comments:
------------------------------------------------------------------------

[2006-01-13 09:15:00] [EMAIL PROTECTED]

Assigned to the date man.

------------------------------------------------------------------------

[2006-01-12 19:51:13] tim at komta dot com

Description:
------------
Prior to PHP 5.1.2 (potentially earlier, just only noticed it)
strtotime(), when used with the optional 'now' argument, would return
the time using the full 'now'.  Now it returns 00:00 on the date of the
'now', ignoring hours, minutes, and seconds.

Reproduce code:
---------------
$this_morning   = strtotime('today 00:00:00');
$tonight                = strtotime('today 23:59:59');

echo date('m/d Hi', strtotime('yesterday', $this_morning)).'<br/>';
echo date('m/d Hi', strtotime('yesterday', $tonight)).'<br/>';

Expected result:
----------------
(as of 2005-01-12):

01/11 0000
01/11 2359

Actual result:
--------------
(as of 2005-01-12):

01/11 0000
01/11 0000


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35983&edit=1

Reply via email to